pub enum AddressKind {
Direct,
Mapped,
Reflexive,
Relay,
Unknown,
}Expand description
How a candidate address was learned — the L7 dig.getPeers addresses[].kind tokens (SPEC §3.1).
The lowercase serde spelling is the frozen wire form.
Variants§
Direct
A directly reachable address (publicly routable or port-forwarded).
Mapped
A UPnP / NAT-PMP / PCP-mapped external address.
Reflexive
A STUN-discovered public reflexive address.
Relay
Reachable through the relay (no direct candidate).
Unknown
An unrecognized token — the catch-all so an unknown kind skips the entry (SPEC §3.3)
instead of aborting the message. Never emitted by a conformant sender.
Implementations§
Source§impl AddressKind
impl AddressKind
Trait Implementations§
Source§impl Clone for AddressKind
impl Clone for AddressKind
Source§fn clone(&self) -> AddressKind
fn clone(&self) -> AddressKind
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for AddressKind
Source§impl Debug for AddressKind
impl Debug for AddressKind
Source§impl Default for AddressKind
impl Default for AddressKind
Source§fn default() -> AddressKind
fn default() -> AddressKind
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for AddressKind
impl<'de> Deserialize<'de> for AddressKind
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for AddressKind
Source§impl PartialEq for AddressKind
impl PartialEq for AddressKind
Source§impl Serialize for AddressKind
impl Serialize for AddressKind
impl StructuralPartialEq for AddressKind
Auto Trait Implementations§
impl Freeze for AddressKind
impl RefUnwindSafe for AddressKind
impl Send for AddressKind
impl Sync for AddressKind
impl Unpin for AddressKind
impl UnsafeUnpin for AddressKind
impl UnwindSafe for AddressKind
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