aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-netdoc/src/doc/netstatus/md.rs
blob: ee8791d158a772de9bd8de126c47b9bf871381ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
//! Implementation for microdesc consensus documents.
//
// Read this file in conjunction with `each_variety.rs`.
// See "module scope" ns_variety_definition_macros.rs.

use super::*;

// Import `each_variety.rs`, appropriately variegated
ns_do_variety_md! {}

/// Used for reporting errors when parsing this document type
const NETSTATUS_DOCTYPE_FOR_ERROR: &str = "md consensus";

define_constant_string! {
    /// The `md` keyword in a microdescriptor consensus heading line
    ///
    /// This type is one of the fields in `NetworkStatusVersionItem`.
    ///
    /// md consensuses start with `network-status-version 3 md ...`
    ///
    /// In our terminology this is an `md` consensus, in but the protocol it's `microdesc`
    /// So in *this* variety, the variety it's the fixed string `microdesc`.
    VarietyKeyword = "microdesc";
}