pub fn relay_document_by_nick<D>(
nick: &str,
docs: &[RelayDocument<D>],
) -> &'static DExpand description
Find a particular relay’s document, given the relay’s nickname
This is sound for testdata_live data, because we only have a small curated
subset of of relays, all of which have distinct nicks.
§Panics
Panics if no relay with the given name is found.
§Example
use tor_netdoc::doc::microdesc::Microdesc;
use tor_netdoc::testdata_live::{relay_document_by_nick, relay_microdescs};
let _: &'static Microdesc = relay_document_by_nick("lisdex", &relay_microdescs());