tor_netdoc/doc/netstatus/rs/md.rs
1//! Implementation for the style of router descriptors used in
2//! microdesc consensus documents.
3//
4// Read this file in conjunction with `each_variety.rs`.
5// See "module scope" ns_variety_definition_macros.rs.
6
7use super::*;
8
9// Import `each_variety.rs`, appropriately variegated
10ns_do_variety_md! {}
11
12// We bind some variety-agnostic names for the benefit of `each_variety.rs`,
13// which reimports the contents of this module with `use super::*`.
14pub(crate) use crate::doc::microdesc::{DOC_DIGEST_LEN, MdDigest as DocDigest};
15
16/// The flavor
17const FLAVOR: ConsensusFlavor = ConsensusFlavor::Microdesc;
18
19impl RouterStatus {
20 /// Return the expected microdescriptor digest for this routerstatus
21 pub fn md_digest(&self) -> &DocDigest {
22 self.doc_digest()
23 }
24}