Trait tor_linkspec::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§
sourcefn ntor_onion_key(&self) -> &PublicKey
fn ntor_onion_key(&self) -> &PublicKey
Return the ntor onion key for this relay
Provided Methods§
sourcefn linkspecs(&self) -> EncodeResult<Vec<EncodedLinkSpec>>
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.
Object Safety§
This trait is not object safe.
Implementors§
impl CircTarget for OwnedCircTarget
impl<T: CircTarget> CircTarget for VerbatimLinkSpecCircTarget<T>
Available on crate feature
verbatim
only.