Skip to main content

Module types

Module types 

Source
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§

family
Implements the relay ‘family’ type.
policy
Exit policies: match patterns of addresses and/or ports.
raw_data_object
Conversion module for Vec<u8> as Object with ItemValueParseable/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
Base64Fingerprint
A base64-encoded fingerprint (unpadded)
ContactInfo
contact item: contact information (eg of a relay dirauth operator)
Curve25519Public
A Curve25519 public key, encoded in base64 with optional padding
Ed25519FamilyCert
An Ed25519 family certificate.
Ed25519IdentityCert
An Ed25519 identity certificate.
Ed25519IdentityLine
Ed25519 public key in the form <keyword> id <base64>
Ed25519NtorCrossCert
Verified reverse cert by K_ntor on KP_relayid_ed
Ed25519Public
An alleged ed25519 public key, encoded in base64 with optional padding.
EmbeddedCert
One certificate inside a netdoc, covering data other than the netdoc itself
F64Finite
A finite floating point number
Fingerprint
A hex-encoded fingerprint with no spaces.
FixedB64
A byte array encoded in a hexadecimal with a fixed length.
FixedB16U
A fixed-length version of B16U.
Hostname
Internet hostname
IdentifiedDigest
A single digest made with a nominated digest algorithm, ALGORITHM=DIGEST
Ignored
Ignored part of a network document.
IgnoredItemOrObjectValue
An Item or Object that would be ignored during parsing and is omitted during encoding
InvalidContactInfo
Contact information (contact item value) has invalid syntax
InvalidHostname
Invalid hostname
InvalidInternetHost
Invalid Internet hostname/address
InvalidNickname
Invalid nickname
Iso8601TimeNoSp
A wall-clock time, encoded in ISO8601 format without an intervening space.
Iso8601TimeSp
A wall-clock time, encoded in Iso8601 format with an intervening space between the date and time.
ItemPresent
An item that only matters in terms of presence of absence.
Nickname
The nickname for a Tor relay.
NoMoreArguments
Indicates that no further arguments are allowed in a network document Item line
NotPresent
Part of a network document, that isn’t actually there.
NotPresentEachValue
An individual value that is not present - placeholder type
NumericBoolean
A boolean that is represented by a 0 (false) or 1 (true).
RetainedOrderVec
A sequence of T items, with their order retained
RsaSha1Signature
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§

DigestName
The name of a digest algorithm.
Ed25519AlgorithmString
Helper that checks for the presence of ed25519.
F64FiniteParseError
Error parsing F64Finite from a string
InternetHost
Hostname, or IP address (v4 or v6)
KeywordOrString
Known keyword (enum) value, or arbitrary string
Unknown
Information about unknown values, which may have been retained as a T

Traits§

EmbeddableCertObject
Certificate data whose unverified form UR is representable as a netdoc Object