Trait tor_hsservice::internal_prelude::CircTarget
pub(crate) trait CircTarget: ChanTarget {
// Required methods
fn ntor_onion_key(&self) -> &PublicKey;
fn protovers(&self) -> &Protocols;
// Provided method
fn linkspecs(&self) -> Result<Vec<EncodedLinkSpec>, EncodeError> { ... }
}
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§
fn ntor_onion_key(&self) -> &PublicKey
fn ntor_onion_key(&self) -> &PublicKey
Return the ntor onion key for this relay
Provided Methods§
fn linkspecs(&self) -> Result<Vec<EncodedLinkSpec>, EncodeError>
fn linkspecs(&self) -> Result<Vec<EncodedLinkSpec>, EncodeError>
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.