pub struct CompactNodeInfo {
pub id: Id20,
pub addr: SocketAddr,
}Expand description
A DHT node: 20-byte ID + IPv4 socket address.
Encoded as 26 bytes: 20-byte node ID, 4-byte IPv4, 2-byte port (big-endian).
Fields§
§id: Id2020-byte node ID.
addr: SocketAddrIPv4 socket address (IP + port).
Implementations§
Trait Implementations§
Source§impl Clone for CompactNodeInfo
impl Clone for CompactNodeInfo
Source§fn clone(&self) -> CompactNodeInfo
fn clone(&self) -> CompactNodeInfo
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 CompactNodeInfo
Source§impl Debug for CompactNodeInfo
impl Debug for CompactNodeInfo
impl Eq for CompactNodeInfo
Source§impl PartialEq for CompactNodeInfo
impl PartialEq for CompactNodeInfo
Source§fn eq(&self, other: &CompactNodeInfo) -> bool
fn eq(&self, other: &CompactNodeInfo) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CompactNodeInfo
Auto Trait Implementations§
impl Freeze for CompactNodeInfo
impl RefUnwindSafe for CompactNodeInfo
impl Send for CompactNodeInfo
impl Sync for CompactNodeInfo
impl Unpin for CompactNodeInfo
impl UnsafeUnpin for CompactNodeInfo
impl UnwindSafe for CompactNodeInfo
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