pub struct Address {
pub host: String,
pub port: u16,
pub kind: AddressKind,
}Expand description
One candidate address for a peer: { host, port, kind } (SPEC §3.1). Byte-compatible with the L7
dig.getPeers / DHT Contact address shape.
Fields§
§host: StringIPv4/IPv6 literal or hostname. MUST be non-empty (SPEC §3.3).
port: u16P2P port, 1–65535. A port of 0 skips the entry (SPEC §3.3).
kind: AddressKindHow this address was learned.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Address
impl<'de> Deserialize<'de> for Address
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 Address
impl StructuralPartialEq for Address
Auto Trait Implementations§
impl Freeze for Address
impl RefUnwindSafe for Address
impl Send for Address
impl Sync for Address
impl Unpin for Address
impl UnsafeUnpin for Address
impl UnwindSafe for Address
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