Expand description
Various types that can occur in parsed network documents.
Some of the types are parsing adapters: transparent newtypes that can be used for type-driven parsing in netdocs. These are needed (rather than using the underlying value type) in cases where network documents have different syntaxes for the same thing.
NOTE: Several of these modules may eventually move elsewhere, or become their own crates.
Modules§
- embedded_
cert 🔒 - Types related to certificates
- family
- Implements the relay ‘family’ type.
- misc 🔒
- Types used to parse arguments of entries in a directory document.
- parse2_
encode 🔒 - Helpers for parse2 and encode
- policy
- Exit policies: match patterns of addresses and/or ports.
- raw_
data_ object - Conversion module for
Vec<u8>as Object withItemValueParseable/ItemValueEncodable - relay_
flags - Relay flags (aka Router Status Flags), eg in network status documents
- routerdesc
- Types for router descriptors.
- version
- Parsing and comparison for Tor versions
Structs§
- B16
- A byte array encoded in hexadecimal; prints in lowercase
- B64
- A byte array, encoded in base64 with optional padding.
- B16U
- A byte array encoded in hexadecimal; prints in uppercase
- Base64
Fingerprint - A base64-encoded fingerprint (unpadded)
- Contact
Info contactitem: contact information (eg of a relay dirauth operator)- Curve25519
Public - A Curve25519 public key, encoded in base64 with optional padding
- Ed25519
Identity Line - An Ed25519 public key found in a micro descriptor
idline. - Ed25519
Public - An alleged ed25519 public key, encoded in base64 with optional padding.
- Embedded
Cert - One certificate inside a netdoc, covering data other than the netdoc itself
- Fingerprint
- A hex-encoded fingerprint with no spaces.
- Fixed
B64 - A byte array encoded in a hexadecimal with a fixed length.
- Fixed
B16U - A fixed-length version of
B16U. - Hostname
- Internet hostname
- Identified
Digest - A single digest made with a nominated digest algorithm,
ALGORITHM=DIGEST - Ignored
- Ignored part of a network document.
- Ignored
Item OrObject Value - An Item or Object that would be ignored during parsing and is omitted during encoding
- Invalid
Hostname - Invalid hostname
- Invalid
Internet Host - Invalid Internet hostname/address
- Invalid
Nickname - Invalid nickname
- Iso8601
Time NoSp - A wall-clock time, encoded in ISO8601 format without an intervening space.
- Iso8601
Time Sp - A wall-clock time, encoded in Iso8601 format with an intervening space between the date and time.
- Nickname
- The nickname for a Tor relay.
- NotPresent
- Part of a network document, that isn’t actually there.
- Numeric
Boolean - A boolean that is represented by a
0(false) or1(true). - Retained
Order Vec - A sequence of
Titems, with their order retained - RsaSha1
Signature - RSA signature using SHA-1 as per “Signing documents” in dir-spec
- SpFingerprint
- A hex-encoded RSA key identity (fingerprint) with spaces in it.
Enums§
- Digest
Name - The name of a digest algorithm.
- Ed25519
Algorithm String - Helper that checks for the presence of
ed25519. - Internet
Host - Hostname, or IP address (v4 or v6)
- Keyword
OrString - Known keyword (enum) value, or arbitrary string
- Unknown
- Information about unknown values, which may have been retained as a
T
Traits§
- Embeddable
Cert Object - Certificate data whose unverified form
URis representable as a netdoc Object