Struct tor_netdir::UncheckedRelay
source · pub struct UncheckedRelay<'a> { /* private fields */ }Expand description
A relay that we haven’t checked for validity or usability in routing.
Implementations§
source§impl<'a> UncheckedRelay<'a>
impl<'a> UncheckedRelay<'a>
sourcepub fn is_usable(&self) -> bool
pub fn is_usable(&self) -> bool
Return true if this relay is valid and usable.
This function should return true for every Relay we expose
to the user.
sourcepub fn into_relay(self) -> Option<Relay<'a>>
pub fn into_relay(self) -> Option<Relay<'a>>
If this is usable, return a corresponding Relay object.
sourcepub fn is_flagged_guard(&self) -> bool
pub fn is_flagged_guard(&self) -> bool
Return true if this relay has the guard flag.
sourcepub fn is_dir_cache(&self) -> bool
pub fn is_dir_cache(&self) -> bool
Return true if this relay is a potential directory cache.
Trait Implementations§
source§impl<'a> Debug for UncheckedRelay<'a>
impl<'a> Debug for UncheckedRelay<'a>
source§impl<'a> HasRelayIds for UncheckedRelay<'a>
impl<'a> HasRelayIds for UncheckedRelay<'a>
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>(&self, other: &T) -> boolwhere
T: HasRelayIds + ?Sized,
fn same_relay_ids<T>(&self, other: &T) -> boolwhere T: HasRelayIds + ?Sized,
Return true if this object has exactly the same relay IDs as
other.source§fn has_all_relay_ids_from<T>(&self, other: &T) -> boolwhere
T: HasRelayIds + ?Sized,
fn has_all_relay_ids_from<T>(&self, other: &T) -> boolwhere T: HasRelayIds + ?Sized,
Return true if this object has every relay ID that
other does. Read moresource§fn cmp_by_relay_ids<T>(&self, other: &T) -> Orderingwhere
T: HasRelayIds + ?Sized,
fn cmp_by_relay_ids<T>(&self, other: &T) -> Orderingwhere T: HasRelayIds + ?Sized,
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<'a> RefUnwindSafe for UncheckedRelay<'a>
impl<'a> Send for UncheckedRelay<'a>
impl<'a> Sync for UncheckedRelay<'a>
impl<'a> Unpin for UncheckedRelay<'a>
impl<'a> UnwindSafe for UncheckedRelay<'a>
Blanket Implementations§
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