Trait CircTarget

Source
pub trait CircTarget: ChanTarget {
    // Required methods
    fn ntor_onion_key(&self) -> &PublicKey;
    fn protovers(&self) -> &Protocols;

    // Provided method
    fn linkspecs(&self) -> EncodeResult<Vec<EncodedLinkSpec>> { ... }
}
Expand description

Information about a Tor relay used to extend a circuit to it.

Anything that implements ‘CircTarget’ can be used as the identity of a relay for the purposes of extending a circuit.

Required Methods§

Source

fn ntor_onion_key(&self) -> &PublicKey

Return the ntor onion key for this relay

Source

fn protovers(&self) -> &Protocols

Return the subprotocols implemented by this relay.

Provided Methods§

Source

fn linkspecs(&self) -> EncodeResult<Vec<EncodedLinkSpec>>

Return a new vector of encoded link specifiers for this relay.

Note that, outside of this method, nothing in Arti should be re-ordering the link specifiers returned by this method. It is this method’s responsibility to return them in the correct order.

The default implementation for this method builds a list of link specifiers from this object’s identities and IP addresses, and sorts them into the order specified in tor-spec to avoid implementation fingerprinting attacks.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl CircTarget for OwnedCircTarget

Source§

impl<T: CircTarget> CircTarget for VerbatimLinkSpecCircTarget<T>

Available on crate feature verbatim only.