pub struct Addresses { /* private fields */ }
Expand description
A non-empty list of (unique) addresses of a peer in the routing table.
Implementations§
source§impl Addresses
impl Addresses
sourcepub fn remove(&mut self, addr: &Multiaddr) -> Result<(), ()>
pub fn remove(&mut self, addr: &Multiaddr) -> Result<(), ()>
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.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Addresses
impl Send for Addresses
impl Sync for Addresses
impl Unpin for Addresses
impl UnwindSafe for Addresses
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