Skip to main content

tor_netdoc/doc/netstatus/
md.rs

1//! Implementation for microdesc consensus documents.
2//
3// Read this file in conjunction with `each_variety.rs`.
4// See "module scope" ns_variety_definition_macros.rs.
5
6use super::*;
7
8// Import `each_variety.rs`, appropriately variegated
9ns_do_variety_md! {}
10
11/// Used for reporting errors when parsing this document type
12const NETSTATUS_DOCTYPE_FOR_ERROR: &str = "md consensus";
13
14define_constant_string! {
15    /// The `md` keyword in a microdescriptor consensus heading line
16    ///
17    /// This type is one of the fields in `NetworkStatusVersionItem`.
18    ///
19    /// md consensuses start with `network-status-version 3 md ...`
20    ///
21    /// In our terminology this is an `md` consensus, in but the protocol it's `microdesc`
22    /// So in *this* variety, the variety it's the fixed string `microdesc`.
23    VarietyKeyword = "microdesc";
24}