pub struct VerbatimLinkSpecCircTarget<T> { /* private fields */ }
Available on crate feature verbatim only.
Expand description

A wrapper around an underlying CircTarget that provides a user-specified list of link specifiers.

Onion services and their clients use this type of target when telling a relay to extend a circuit to a target relay (an introduction point or rendezvous point) chosen by some other party.

Implementations§

source§

impl<T> VerbatimLinkSpecCircTarget<T>

source

pub fn new(target: T, linkspecs: Vec<EncodedLinkSpec>) -> Self

Construct a new VerbatimLinkSpecCircTarget to wrap an underlying CircTarget object, and provide it with a new set of encoded link specifiers that will be used when telling a relay to extend to this node.

Note that nothing here will check that linkspecs is sufficient to actually connect to the chosen target, or to any target at all. It is the caller’s responsibility to choose a valid set of link specifiers.

Trait Implementations§

source§

impl<T: ChanTarget> ChanTarget for VerbatimLinkSpecCircTarget<T>

source§

fn display_chan_target(&self) -> DisplayChanTarget<'_, Self>
where Self: Sized,

Return a reference to this object suitable for formatting its ChanTarget-specific members. Read more
source§

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

source§

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

Return a new vector of encoded link specifiers for this relay. Read more
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.
source§

impl<T: Clone> Clone for VerbatimLinkSpecCircTarget<T>

source§

fn clone(&self) -> VerbatimLinkSpecCircTarget<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T: Debug> Debug for VerbatimLinkSpecCircTarget<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T: HasAddrs> HasAddrs for VerbatimLinkSpecCircTarget<T>

source§

fn addrs(&self) -> &[SocketAddr]

Return the addresses listed for this server. Read more
source§

impl<T: HasChanMethod> HasChanMethod for VerbatimLinkSpecCircTarget<T>

source§

fn chan_method(&self) -> ChannelMethod

Return the known ways to contact this
source§

impl<T: HasRelayIds> HasRelayIds for VerbatimLinkSpecCircTarget<T>

source§

fn identity(&self, key_type: RelayIdType) -> Option<RelayIdRef<'_>>

Return the identity of this relay whose type is key_type, or None if the relay has no such identity. Read more
source§

fn identities(&self) -> RelayIdIter<'_, Self>

Return an iterator over all of the identities held by this object.
source§

fn ed_identity(&self) -> Option<&Ed25519Identity>

Return the ed25519 identity for this relay if it has one.
source§

fn rsa_identity(&self) -> Option<&RsaIdentity>

Return the RSA identity for this relay if it has one.
source§

fn has_identity(&self, id: RelayIdRef<'_>) -> bool

Check whether the provided Id is a known identity of this relay. Read more
source§

fn has_any_identity(&self) -> bool

Return true if this object has any known identity.
source§

fn same_relay_ids<T: HasRelayIds + ?Sized>(&self, other: &T) -> bool

Return true if this object has exactly the same relay IDs as other.
source§

fn has_all_relay_ids_from<T: HasRelayIds + ?Sized>(&self, other: &T) -> bool

Return true if this object has every relay ID that other does. Read more
source§

fn has_any_relay_id_from<T: HasRelayIds + ?Sized>(&self, other: &T) -> bool

Return true if this object has any relay ID that other has. Read more
source§

fn cmp_by_relay_ids<T: HasRelayIds + ?Sized>(&self, other: &T) -> Ordering

Compare this object to another HasRelayIds. Read more
source§

fn display_relay_ids(&self) -> DisplayRelayIds<'_, Self>

Return a reference to this object suitable for formatting its HasRelayIds members.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

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

fn in_current_span(self) -> Instrumented<Self>

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

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

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

fn with_current_subscriber(self) -> WithDispatch<Self>

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