Enum tor_linkspec::RelayIdType
source · [−]#[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
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
sourceimpl RelayIdType
impl RelayIdType
sourcepub fn all_types() -> RelayIdTypeIterⓘNotable traits for RelayIdTypeIterimpl Iterator for RelayIdTypeIter type Item = RelayIdType;
pub fn all_types() -> RelayIdTypeIterⓘNotable traits for RelayIdTypeIterimpl Iterator for RelayIdTypeIter type Item = RelayIdType;
Return an iterator over all
Trait Implementations
sourceimpl Clone for RelayIdType
impl Clone for RelayIdType
sourcefn clone(&self) -> RelayIdType
fn clone(&self) -> RelayIdType
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 RelayIdType
impl Debug for RelayIdType
sourceimpl Display for RelayIdType
impl Display for RelayIdType
sourceimpl FromStr for RelayIdType
impl FromStr for RelayIdType
sourceimpl Hash for RelayIdType
impl Hash for RelayIdType
sourceimpl IntoEnumIterator for RelayIdType
impl IntoEnumIterator for RelayIdType
type Iterator = RelayIdTypeIter
fn iter() -> RelayIdTypeIterⓘNotable traits for RelayIdTypeIterimpl Iterator for RelayIdTypeIter type Item = RelayIdType;
sourceimpl Ord for RelayIdType
impl Ord for RelayIdType
sourcefn cmp(&self, other: &RelayIdType) -> Ordering
fn cmp(&self, other: &RelayIdType) -> Ordering
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialEq<RelayIdType> for RelayIdType
impl PartialEq<RelayIdType> for RelayIdType
sourcefn eq(&self, other: &RelayIdType) -> bool
fn eq(&self, other: &RelayIdType) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourceimpl PartialOrd<RelayIdType> for RelayIdType
impl PartialOrd<RelayIdType> for RelayIdType
sourcefn partial_cmp(&self, other: &RelayIdType) -> Option<Ordering>
fn partial_cmp(&self, other: &RelayIdType) -> Option<Ordering>
This method returns an ordering between self and other values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · sourcefn 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 more
impl Copy for RelayIdType
impl Eq for RelayIdType
impl StructuralEq for RelayIdType
impl StructuralPartialEq for RelayIdType
Auto Trait Implementations
impl RefUnwindSafe for RelayIdType
impl Send for RelayIdType
impl Sync for RelayIdType
impl Unpin for RelayIdType
impl UnwindSafe for RelayIdType
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