#[non_exhaustive]pub enum RelayIdType {
Ed25519,
Rsa,
}
Expand description
The type of a 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.
Ed25519
An Ed25519 identity.
Every relay (currently) has one of these identities. It is the same as the encoding of the relay’s public Ed25519 identity key.
Rsa
An RSA identity.
Every relay (currently) has one of these identities. It is computed as a SHA-1 digest of the DER encoding of the relay’s public RSA 1024-bit identity key. Because of short key length, this type of identity should not be considered secure on its own.
Implementations§
Trait Implementations§
Source§impl Clone for RelayIdType
impl Clone for RelayIdType
Source§fn clone(&self) -> RelayIdType
fn clone(&self) -> RelayIdType
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 Debug for RelayIdType
impl Debug for RelayIdType
Source§impl Display for RelayIdType
impl Display for RelayIdType
Source§impl FromStr for RelayIdType
impl FromStr for RelayIdType
Source§impl Hash for RelayIdType
impl Hash for RelayIdType
Source§impl IntoEnumIterator for RelayIdType
impl IntoEnumIterator for RelayIdType
type Iterator = RelayIdTypeIter
fn iter() -> RelayIdTypeIter ⓘ
Source§impl Ord for RelayIdType
impl Ord for RelayIdType
Source§fn cmp(&self, other: &RelayIdType) -> Ordering
fn cmp(&self, other: &RelayIdType) -> 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 PartialEq for RelayIdType
impl PartialEq for RelayIdType
Source§impl PartialOrd for RelayIdType
impl PartialOrd for RelayIdType
impl Copy for RelayIdType
impl Eq for RelayIdType
impl StructuralPartialEq for RelayIdType
Auto Trait Implementations§
impl Freeze for RelayIdType
impl RefUnwindSafe for RelayIdType
impl Send for RelayIdType
impl Sync for RelayIdType
impl Unpin for RelayIdType
impl UnwindSafe for RelayIdType
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<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