Struct tor_linkspec::OwnedChanTarget
source · [−]pub struct OwnedChanTarget { /* private fields */ }Expand description
OwnedChanTarget is a summary of a ChanTarget that owns all of its
members.
Implementations
sourceimpl OwnedChanTarget
impl OwnedChanTarget
sourcepub fn new(
addrs: Vec<SocketAddr>,
ed_identity: Ed25519Identity,
rsa_identity: RsaIdentity
) -> Self
pub fn new(
addrs: Vec<SocketAddr>,
ed_identity: Ed25519Identity,
rsa_identity: RsaIdentity
) -> Self
Construct a new OwnedChanTarget from its parts.
sourcepub fn from_chan_target<C>(target: &C) -> Self where
C: ChanTarget + ?Sized,
pub fn from_chan_target<C>(target: &C) -> Self where
C: ChanTarget + ?Sized,
Construct a OwnedChanTarget from a given ChanTarget.
sourcepub fn restrict_addr(&self, addr: &SocketAddr) -> Result<Self, Self>
pub fn restrict_addr(&self, addr: &SocketAddr) -> Result<Self, Self>
Construct a new OwnedChanTarget containing only the provided addr.
If addr is not an address of this ChanTarget, return the original OwnedChanTarget.
Trait Implementations
sourceimpl Clone for OwnedChanTarget
impl Clone for OwnedChanTarget
sourcefn clone(&self) -> OwnedChanTarget
fn clone(&self) -> OwnedChanTarget
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for OwnedChanTarget
impl Debug for OwnedChanTarget
sourceimpl Display for OwnedChanTarget
impl Display for OwnedChanTarget
Primarily for error reporting and logging
sourceimpl HasAddrs for OwnedChanTarget
impl HasAddrs for OwnedChanTarget
sourcefn addrs(&self) -> &[SocketAddr]
fn addrs(&self) -> &[SocketAddr]
Return the addresses at which you can connect to this server.
sourceimpl HasRelayIds for OwnedChanTarget
impl HasRelayIds for OwnedChanTarget
sourcefn 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 more
sourcefn identities(&self) -> RelayIdIter<'_, Self>
fn identities(&self) -> RelayIdIter<'_, Self>
Return an iterator over all of the identities held by this object.
sourcefn ed_identity(&self) -> Option<&Ed25519Identity>
fn ed_identity(&self) -> Option<&Ed25519Identity>
Return the ed25519 identity for this relay if it has one.
sourcefn rsa_identity(&self) -> Option<&RsaIdentity>
fn rsa_identity(&self) -> Option<&RsaIdentity>
Return the RSA identity for this relay if it has one.
sourcefn 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
sourcefn 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.
sourcefn 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 more
impl ChanTarget for OwnedChanTarget
Auto Trait Implementations
impl RefUnwindSafe for OwnedChanTarget
impl Send for OwnedChanTarget
impl Sync for OwnedChanTarget
impl Unpin for OwnedChanTarget
impl UnwindSafe for OwnedChanTarget
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more