Enum tor_linkspec::LinkSpec
source · [−]#[non_exhaustive]
pub enum LinkSpec {
OrPort(IpAddr, u16),
RsaId(RsaIdentity),
Ed25519Id(Ed25519Identity),
Unrecognized(u8, Vec<u8>),
}
Expand description
A piece of information about a relay and how to connect to it.
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.
OrPort(IpAddr, u16)
The TCP address of an OR Port for a relay
RsaId(RsaIdentity)
The RSA identity fingerprint of the relay
Ed25519Id(Ed25519Identity)
The Ed25519 identity of the relay
Unrecognized(u8, Vec<u8>)
A link specifier that we didn’t recognize
Implementations
sourceimpl LinkSpec
impl LinkSpec
sourcepub fn sort_by_type(lst: &mut [Self])
pub fn sort_by_type(lst: &mut [Self])
Sort a slice of LinkSpec based on the order in which they should appear in an EXTEND cell.
Trait Implementations
sourceimpl From<&SocketAddr> for LinkSpec
impl From<&SocketAddr> for LinkSpec
sourcefn from(sa: &SocketAddr) -> Self
fn from(sa: &SocketAddr) -> Self
Converts to this type from the input type.
sourceimpl From<Ed25519Identity> for LinkSpec
impl From<Ed25519Identity> for LinkSpec
sourcefn from(id: Ed25519Identity) -> Self
fn from(id: Ed25519Identity) -> Self
Converts to this type from the input type.
sourceimpl From<RsaIdentity> for LinkSpec
impl From<RsaIdentity> for LinkSpec
sourcefn from(id: RsaIdentity) -> Self
fn from(id: RsaIdentity) -> Self
Converts to this type from the input type.
sourceimpl From<SocketAddr> for LinkSpec
impl From<SocketAddr> for LinkSpec
sourcefn from(sa: SocketAddr) -> Self
fn from(sa: SocketAddr) -> Self
Converts to this type from the input type.
sourceimpl Writeable for LinkSpec
impl Writeable for LinkSpec
sourcefn write_onto<B: Writer + ?Sized>(&self, w: &mut B)
fn write_onto<B: Writer + ?Sized>(&self, w: &mut B)
Encode this object into the writer b
.
impl Eq for LinkSpec
impl StructuralEq for LinkSpec
impl StructuralPartialEq for LinkSpec
Auto Trait Implementations
impl RefUnwindSafe for LinkSpec
impl Send for LinkSpec
impl Sync for LinkSpec
impl Unpin for LinkSpec
impl UnwindSafe for LinkSpec
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
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<W> WriteableOnce for W where
W: Writeable,
impl<W> WriteableOnce for W where
W: Writeable,
sourcefn write_into<B>(self, b: &mut B) where
B: Writer + ?Sized,
fn write_into<B>(self, b: &mut B) where
B: Writer + ?Sized,
Encode this object into the writer b
, and consume it.