pub struct PeerTable<S> { /* private fields */ }Implementations§
Source§impl<S> PeerTable<S>
impl<S> PeerTable<S>
pub fn new() -> PeerTable<S>
pub fn upsert_peer(&mut self, addr: Ipv6Addr, now_ms: u64) -> PeerObservation
pub fn prune_stale_peers(&mut self, now_ms: u64) -> usize
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn known_peer_addresses(&self) -> impl Iterator<Item = Ipv6Addr>
Trait Implementations§
Auto Trait Implementations§
impl<S> Freeze for PeerTable<S>where
S: Freeze,
impl<S> RefUnwindSafe for PeerTable<S>where
S: RefUnwindSafe,
impl<S> Send for PeerTable<S>where
S: Send,
impl<S> Sync for PeerTable<S>where
S: Sync,
impl<S> Unpin for PeerTable<S>where
S: Unpin,
impl<S> UnsafeUnpin for PeerTable<S>where
S: UnsafeUnpin,
impl<S> UnwindSafe for PeerTable<S>where
S: UnwindSafe,
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