pub struct EngineDiscoveryContext { /* private fields */ }Expand description
Engine implementation of DiscoveryContext.
Constructed once at engine build time and stored in EngineInner. Every
task that may call on_face_up / on_face_down / on_inbound receives an
Arc<EngineDiscoveryContext>.
Trait Implementations§
Source§impl DiscoveryContext for EngineDiscoveryContext
impl DiscoveryContext for EngineDiscoveryContext
Source§fn alloc_face_id(&self) -> FaceId
fn alloc_face_id(&self) -> FaceId
Allocate a unique
FaceId from the engine’s face table. Read moreSource§fn add_face(&self, face: Arc<dyn ErasedFace>) -> FaceId
fn add_face(&self, face: Arc<dyn ErasedFace>) -> FaceId
Add a dynamically created face to the engine. Read more
Source§fn remove_face(&self, face_id: FaceId)
fn remove_face(&self, face_id: FaceId)
Remove a face from the engine, stopping its tasks.
Source§fn add_fib_entry(
&self,
prefix: &Name,
nexthop: FaceId,
cost: u32,
owner: ProtocolId,
)
fn add_fib_entry( &self, prefix: &Name, nexthop: FaceId, cost: u32, owner: ProtocolId, )
Install a FIB route owned by
owner. Read moreSource§fn remove_fib_entry(&self, prefix: &Name, nexthop: FaceId, owner: ProtocolId)
fn remove_fib_entry(&self, prefix: &Name, nexthop: FaceId, owner: ProtocolId)
Remove a single FIB nexthop.
Source§fn remove_fib_entries_by_owner(&self, owner: ProtocolId)
fn remove_fib_entries_by_owner(&self, owner: ProtocolId)
Remove every FIB route installed by
owner.Source§fn neighbors(&self) -> Arc<dyn NeighborTableView>
fn neighbors(&self) -> Arc<dyn NeighborTableView>
Read access to the engine-owned neighbor table.
Source§fn update_neighbor(&self, update: NeighborUpdate)
fn update_neighbor(&self, update: NeighborUpdate)
Apply a mutation to the engine-owned neighbor table.
Auto Trait Implementations§
impl Freeze for EngineDiscoveryContext
impl !RefUnwindSafe for EngineDiscoveryContext
impl Send for EngineDiscoveryContext
impl Sync for EngineDiscoveryContext
impl Unpin for EngineDiscoveryContext
impl !UnwindSafe for EngineDiscoveryContext
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