pub enum RouterStatusEntryType {
V2,
V3,
MicroV3,
Bridge,
}Expand description
The type of router status entry, determining its format and available fields.
Different versions and flavors of network status documents use different
entry formats. The entry type affects which fields are present and how
certain lines (like the r line) are parsed.
§Variants
Each variant corresponds to a specific document type:
V2- Legacy network status v2 documentsV3- Standard network status v3 consensusMicroV3- Microdescriptor-flavored v3 consensusBridge- Bridge network status documents
§Format Differences
The main difference between entry types is the r line format:
- V2/V3/Bridge:
r nickname identity digest published address or_port dir_port - MicroV3:
r nickname identity published address or_port dir_port(no digest)
MicroV3 entries use the m line for the microdescriptor digest instead.
§Example
use stem_rs::descriptor::router_status::RouterStatusEntryType;
let entry_type = RouterStatusEntryType::V3;
assert_eq!(entry_type, RouterStatusEntryType::V3);Variants§
V2
Legacy network status v2 entry format.
Used in older network status documents. Contains a SHA-1 digest of the relay’s server descriptor.
V3
Standard network status v3 entry format.
The most common format, used in regular consensus documents. Contains a SHA-1 digest of the relay’s server descriptor.
MicroV3
Microdescriptor-flavored v3 entry format.
Used in microdescriptor consensus documents. Does not contain
a server descriptor digest in the r line; instead uses the
m line for the microdescriptor digest.
Bridge
Bridge network status entry format.
Used for bridge relay status entries. Similar to V2 format but specific to bridge authority documents.
Trait Implementations§
Source§impl Clone for RouterStatusEntryType
impl Clone for RouterStatusEntryType
Source§fn clone(&self) -> RouterStatusEntryType
fn clone(&self) -> RouterStatusEntryType
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more