Skip to main content

tor_netdoc/
testdata_live.rs

1//! Test data, downloaded from the live network, and filtered to reduce its size
2
3#[macro_use]
4#[path = "../testdata-live/generated_consts.rs"]
5#[rustfmt::skip] // shell script output is nice, but not 100% identical to rustfmt
6mod generated_consts;
7
8pub use generated_consts::*;
9
10/// Three test data file contents', one per variety
11#[derive(Clone, Debug)]
12#[non_exhaustive]
13pub struct PerVariety {
14    /// Plain consensus
15    pub plain: &'static str,
16
17    /// Microdescriptor consensus
18    pub md: &'static str,
19
20    /// Vote
21    pub vote: &'static str,
22}
23
24/// Test data for one (selected) relay
25#[derive(Clone, Debug)]
26#[non_exhaustive]
27pub struct PerRelay {
28    /// Nickname
29    pub nick: &'static str,
30
31    /// Data for this relay
32    pub data: PerVariety,
33}