pub struct Relay<'a> { /* private fields */ }
Expand description

A view of a relay on the Tor network, suitable for building circuits.

Implementations

Return the Ed25519 ID for this relay.

Return the RsaIdentity for this relay.

Return true if this relay and other seem to be the same relay.

(Two relays are the same if they have the same identity.)

Return true if this relay allows exiting to port on IPv4.

Return true if this relay allows exiting to port on IPv6.

Return true if this relay is suitable for use as a directory cache.

Return true if this relay is marked as usable as a new Guard node.

Return true if both relays are in the same subnet, as configured by subnet_config.

Two relays are considered to be in the same subnet if they have IPv4 addresses with the same subnets_family_v4-bit prefix, or if they have IPv6 addresses with the same subnets_family_v6-bit prefix.

Return true if both relays are in the same family.

(Every relay is considered to be in the same family as itself.)

Return true if there are any ports for which this Relay can be used for exit traffic.

(Returns false if this relay doesn’t allow exit traffic, or if it has been flagged as a bad exit.)

Return the IPv4 exit policy for this relay. If the relay has been marked BadExit, return an empty policy

Return the IPv6 exit policy for this relay. If the relay has been marked BadExit, return an empty policy

Return the IPv4 exit policy declared by this relay. Contrary to Relay::ipv4_policy, this does not verify if the relay is marked BadExit.

Return the IPv6 exit policy declared by this relay. Contrary to Relay::ipv6_policy, this does not verify if the relay is marked BadExit.

Trait Implementations

Return the addresses at which you can connect to this relay

Return the ed25519 identity for this relay.

Return the RSA identity for this relay.

Return the ed25519 identity key for this relay, if it is valid. Read more

Return the ntor onion key for this relay

Return the subprotocols implemented by this relay.

Return a new vector of link specifiers for this relay.

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more