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.
Ed25519(&'a Ed25519Identity)
An Ed25519 identity.
Rsa(&'a RsaIdentity)
An RSA identity.
Implementations
sourceimpl<'a> RelayIdRef<'a>
impl<'a> RelayIdRef<'a>
sourcepub fn id_type(&self) -> RelayIdType
pub fn id_type(&self) -> RelayIdType
Return the type of this relay identity.
Trait Implementations
sourceimpl<'a> Clone for RelayIdRef<'a>
impl<'a> Clone for RelayIdRef<'a>
sourcefn clone(&self) -> RelayIdRef<'a>
fn clone(&self) -> RelayIdRef<'a>
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<'a> Debug for RelayIdRef<'a>
impl<'a> Debug for RelayIdRef<'a>
sourceimpl<'a> Display for RelayIdRef<'a>
impl<'a> Display for RelayIdRef<'a>
sourceimpl<'a> From<&'a Ed25519Identity> for RelayIdRef<'a>
impl<'a> From<&'a Ed25519Identity> for RelayIdRef<'a>
sourcefn from(original: &'a Ed25519Identity) -> RelayIdRef<'a>
fn from(original: &'a Ed25519Identity) -> RelayIdRef<'a>
Converts to this type from the input type.
sourceimpl<'a> From<&'a RelayId> for RelayIdRef<'a>
impl<'a> From<&'a RelayId> for RelayIdRef<'a>
sourceimpl<'a> From<&'a RsaIdentity> for RelayIdRef<'a>
impl<'a> From<&'a RsaIdentity> for RelayIdRef<'a>
sourcefn from(original: &'a RsaIdentity) -> RelayIdRef<'a>
fn from(original: &'a RsaIdentity) -> RelayIdRef<'a>
Converts to this type from the input type.
sourceimpl<'a> PartialEq<Ed25519Identity> for RelayIdRef<'a>
impl<'a> PartialEq<Ed25519Identity> for RelayIdRef<'a>
sourcefn 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 ==. Read more
sourceimpl<'a> PartialEq<RelayIdRef<'a>> for RelayIdRef<'a>
impl<'a> PartialEq<RelayIdRef<'a>> for RelayIdRef<'a>
sourcefn 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 ==. Read more
sourceimpl<'a> PartialEq<RsaIdentity> for RelayIdRef<'a>
impl<'a> PartialEq<RsaIdentity> for RelayIdRef<'a>
sourcefn 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 ==. Read more
sourceimpl<'a> Serialize for RelayIdRef<'a>
impl<'a> Serialize for RelayIdRef<'a>
sourceimpl<'a> TryFrom<RelayIdRef<'a>> for &'a Ed25519Identity
impl<'a> TryFrom<RelayIdRef<'a>> for &'a Ed25519Identity
sourceimpl<'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> StructuralEq for RelayIdRef<'a>
impl<'a> StructuralPartialEq for RelayIdRef<'a>
Auto Trait Implementations
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
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