Enum tor_linkspec::RelayIdRef
source · #[non_exhaustive]pub enum RelayIdRef<'a> {
Ed25519(&'a Ed25519Identity),
Rsa(&'a RsaIdentity),
}
Expand description
A reference to a single relay identity.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Implementations§
source§impl<'a> RelayIdRef<'a>
impl<'a> RelayIdRef<'a>
Trait Implementations§
source§impl<'a> Clone for RelayIdRef<'a>
impl<'a> Clone for RelayIdRef<'a>
source§fn clone(&self) -> RelayIdRef<'a>
fn clone(&self) -> RelayIdRef<'a>
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<'a> Debug for RelayIdRef<'a>
impl<'a> Debug for RelayIdRef<'a>
source§impl<'a> Display for RelayIdRef<'a>
impl<'a> Display for RelayIdRef<'a>
source§impl<'a> From<&'a Ed25519Identity> for RelayIdRef<'a>
impl<'a> From<&'a Ed25519Identity> for RelayIdRef<'a>
source§fn from(original: &'a Ed25519Identity) -> RelayIdRef<'a>
fn from(original: &'a Ed25519Identity) -> RelayIdRef<'a>
Converts to this type from the input type.
source§impl<'a> From<&'a RelayId> for RelayIdRef<'a>
impl<'a> From<&'a RelayId> for RelayIdRef<'a>
source§impl<'a> From<&'a RsaIdentity> for RelayIdRef<'a>
impl<'a> From<&'a RsaIdentity> for RelayIdRef<'a>
source§fn from(original: &'a RsaIdentity) -> RelayIdRef<'a>
fn from(original: &'a RsaIdentity) -> RelayIdRef<'a>
Converts to this type from the input type.
source§impl<'a> Hash for RelayIdRef<'a>
impl<'a> Hash for RelayIdRef<'a>
source§impl<'a> Ord for RelayIdRef<'a>
impl<'a> Ord for RelayIdRef<'a>
source§fn cmp(&self, other: &RelayIdRef<'a>) -> Ordering
fn cmp(&self, other: &RelayIdRef<'a>) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl<'a> PartialEq<Ed25519Identity> for RelayIdRef<'a>
impl<'a> PartialEq<Ed25519Identity> for RelayIdRef<'a>
source§fn eq(&self, other: &Ed25519Identity) -> bool
fn eq(&self, other: &Ed25519Identity) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<'a> PartialEq<RsaIdentity> for RelayIdRef<'a>
impl<'a> PartialEq<RsaIdentity> for RelayIdRef<'a>
source§fn eq(&self, other: &RsaIdentity) -> bool
fn eq(&self, other: &RsaIdentity) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<'a> PartialEq for RelayIdRef<'a>
impl<'a> PartialEq for RelayIdRef<'a>
source§fn eq(&self, other: &RelayIdRef<'a>) -> bool
fn eq(&self, other: &RelayIdRef<'a>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<'a> PartialOrd for RelayIdRef<'a>
impl<'a> PartialOrd for RelayIdRef<'a>
source§fn partial_cmp(&self, other: &RelayIdRef<'a>) -> Option<Ordering>
fn partial_cmp(&self, other: &RelayIdRef<'a>) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl<'a> Redactable for RelayIdRef<'a>
impl<'a> Redactable for RelayIdRef<'a>
source§fn display_redacted(&self, f: &mut Formatter<'_>) -> Result
fn display_redacted(&self, f: &mut Formatter<'_>) -> Result
As
Display::fmt
, but produce a redacted representation.source§fn debug_redacted(&self, f: &mut Formatter<'_>) -> Result
fn debug_redacted(&self, f: &mut Formatter<'_>) -> Result
As
Debug::fmt
, but produce a redacted representation.source§fn redacted(&self) -> Redacted<&Self>
fn redacted(&self) -> Redacted<&Self>
Return a smart pointer that will display or debug this object as its
redacted form.
source§fn maybe_redacted(&self, redact: bool) -> MaybeRedacted<&Self>
fn maybe_redacted(&self, redact: bool) -> MaybeRedacted<&Self>
Return a smart pointer that redacts this object if
redact
is true.source§impl<'a> Serialize for RelayIdRef<'a>
impl<'a> Serialize for RelayIdRef<'a>
source§impl<'a> TryFrom<RelayIdRef<'a>> for &'a Ed25519Identity
impl<'a> TryFrom<RelayIdRef<'a>> for &'a Ed25519Identity
source§impl<'a> TryFrom<RelayIdRef<'a>> for &'a RsaIdentity
impl<'a> TryFrom<RelayIdRef<'a>> for &'a RsaIdentity
impl<'a> Copy for RelayIdRef<'a>
impl<'a> Eq for RelayIdRef<'a>
impl<'a> StructuralPartialEq for RelayIdRef<'a>
Auto Trait Implementations§
impl<'a> Freeze for RelayIdRef<'a>
impl<'a> RefUnwindSafe for RelayIdRef<'a>
impl<'a> Send for RelayIdRef<'a>
impl<'a> Sync for RelayIdRef<'a>
impl<'a> Unpin for RelayIdRef<'a>
impl<'a> UnwindSafe for RelayIdRef<'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
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§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