tor_netdoc/
types.rs

1//! Various types that can occur in parsed network documents.
2//!
3//! Some of the types are parsing adapters: transparent newtypes
4//! that can be used for type-driven parsing in netdocs.
5//! These are needed (rather than using the underlying value type)
6//! in cases where network documents have different syntaxes for the same thing.
7//!
8//! NOTE: Several of these modules may eventually move elsewhere,
9//! or become their own crates.
10
11pub mod family;
12pub(crate) mod misc;
13pub mod policy;
14pub mod relay_flags;
15pub mod version;
16
17pub use misc::{Nickname, NotPresent, Unknown};
18
19pub use misc::B64;
20pub use misc::{Base64Fingerprint, Fingerprint, Ignored};
21pub use misc::{DigestName, IdentifiedDigest};
22pub use misc::{Iso8601TimeNoSp, Iso8601TimeSp};
23
24use crate::NormalItemArgument;
25
26impl NormalItemArgument for std::net::Ipv4Addr {}
27impl NormalItemArgument for std::net::SocketAddr {}