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>
impl<T> VerbatimLinkSpecCircTarget<T>
Sourcepub fn new(target: T, linkspecs: Vec<EncodedLinkSpec>) -> Self
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>
impl<T: ChanTarget> ChanTarget for VerbatimLinkSpecCircTarget<T>
Source§fn display_chan_target(&self) -> DisplayChanTarget<'_, Self>where
Self: Sized,
fn display_chan_target(&self) -> DisplayChanTarget<'_, Self>where
Self: Sized,
Return a reference to this object suitable for formatting its
ChanTarget
-specific members. Read moreSource§impl<T: CircTarget> CircTarget for VerbatimLinkSpecCircTarget<T>
impl<T: CircTarget> CircTarget for VerbatimLinkSpecCircTarget<T>
Source§fn linkspecs(&self) -> EncodeResult<Vec<EncodedLinkSpec>>
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
fn ntor_onion_key(&self) -> &PublicKey
Return the ntor onion key for this relay
Source§impl<T: Clone> Clone for VerbatimLinkSpecCircTarget<T>
impl<T: Clone> Clone for VerbatimLinkSpecCircTarget<T>
Source§fn clone(&self) -> VerbatimLinkSpecCircTarget<T>
fn clone(&self) -> VerbatimLinkSpecCircTarget<T>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<T: Debug> Debug for VerbatimLinkSpecCircTarget<T>
impl<T: Debug> Debug for VerbatimLinkSpecCircTarget<T>
Source§impl<T: HasAddrs> HasAddrs for VerbatimLinkSpecCircTarget<T>
impl<T: HasAddrs> HasAddrs for VerbatimLinkSpecCircTarget<T>
Source§fn addrs(&self) -> &[SocketAddr]
fn addrs(&self) -> &[SocketAddr]
Return the addresses listed for this server. Read more
Source§impl<T: HasChanMethod> HasChanMethod for VerbatimLinkSpecCircTarget<T>
impl<T: HasChanMethod> HasChanMethod for VerbatimLinkSpecCircTarget<T>
Source§fn chan_method(&self) -> ChannelMethod
fn chan_method(&self) -> ChannelMethod
Return the known ways to contact this
Source§impl<T: HasRelayIds> HasRelayIds for VerbatimLinkSpecCircTarget<T>
impl<T: HasRelayIds> HasRelayIds for VerbatimLinkSpecCircTarget<T>
Source§fn identity(&self, key_type: RelayIdType) -> Option<RelayIdRef<'_>>
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 moreSource§fn identities(&self) -> RelayIdIter<'_, Self>
fn identities(&self) -> RelayIdIter<'_, Self>
Return an iterator over all of the identities held by this object.
Source§fn ed_identity(&self) -> Option<&Ed25519Identity>
fn ed_identity(&self) -> Option<&Ed25519Identity>
Return the ed25519 identity for this relay if it has one.
Source§fn rsa_identity(&self) -> Option<&RsaIdentity>
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
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
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
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
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 moreSource§fn has_any_relay_id_from<T: HasRelayIds + ?Sized>(&self, other: &T) -> bool
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 moreSource§fn cmp_by_relay_ids<T: HasRelayIds + ?Sized>(&self, other: &T) -> Ordering
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>
fn display_relay_ids(&self) -> DisplayRelayIds<'_, Self>
Return a reference to this object suitable for formatting its
HasRelayIds
members.Auto Trait Implementations§
impl<T> Freeze for VerbatimLinkSpecCircTarget<T>where
T: Freeze,
impl<T> RefUnwindSafe for VerbatimLinkSpecCircTarget<T>where
T: RefUnwindSafe,
impl<T> Send for VerbatimLinkSpecCircTarget<T>where
T: Send,
impl<T> Sync for VerbatimLinkSpecCircTarget<T>where
T: Sync,
impl<T> Unpin for VerbatimLinkSpecCircTarget<T>where
T: Unpin,
impl<T> UnwindSafe for VerbatimLinkSpecCircTarget<T>where
T: UnwindSafe,
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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