Struct libp2p_kad::Addresses
source · [−]pub struct Addresses { /* private fields */ }
Expand description
A non-empty list of (unique) addresses of a peer in the routing table.
Implementations
Removes the given address from the list.
Returns Ok(())
if the address is either not in the list or was found and
removed. Returns Err(())
if the address is the last remaining address,
which cannot be removed.
An address should only be removed if is determined to be invalid or otherwise unreachable.
Adds a new address to the end of the list.
Returns true if the address was added, false otherwise (i.e. if the address is already in the list).
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Addresses
impl UnwindSafe for Addresses
Blanket Implementations
Mutably borrows from an owned value. Read more