pub struct NeighborTable { /* private fields */ }Expand description
Engine-owned, lock-protected neighbor table.
Wrapped in Arc<NeighborTable> so both the engine and the
DiscoveryContext implementation can hold a reference.
Implementations§
Source§impl NeighborTable
impl NeighborTable
pub fn new() -> Arc<Self>
Sourcepub fn apply(&self, update: NeighborUpdate)
pub fn apply(&self, update: NeighborUpdate)
Apply a NeighborUpdate.
Sourcepub fn get(&self, name: &Name) -> Option<NeighborEntry>
pub fn get(&self, name: &Name) -> Option<NeighborEntry>
Snapshot a single entry by name.
Sourcepub fn all(&self) -> Vec<NeighborEntry>
pub fn all(&self) -> Vec<NeighborEntry>
Snapshot all entries.
Trait Implementations§
Source§impl Default for NeighborTable
impl Default for NeighborTable
Source§impl NeighborTableView for NeighborTable
impl NeighborTableView for NeighborTable
Auto Trait Implementations§
impl !Freeze for NeighborTable
impl RefUnwindSafe for NeighborTable
impl Send for NeighborTable
impl Sync for NeighborTable
impl Unpin for NeighborTable
impl UnwindSafe for NeighborTable
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