pub struct RoutingTable<I: Ip, D> { /* private fields */ }
Expand description
An IP routing table.
RoutingTable
maps destination subnets to the nearest IP hosts (on the
local network) able to route IP packets to those subnets.
Implementations§
Source§impl<I: BroadcastIpExt, D: Clone + Debug + PartialEq> RoutingTable<I, D>
impl<I: BroadcastIpExt, D: Clone + Debug + PartialEq> RoutingTable<I, D>
Sourcepub fn add_entry(
&mut self,
entry: EntryAndGeneration<I::Addr, D>,
) -> Result<&EntryAndGeneration<I::Addr, D>, ExistsError>where
D: PartialOrd,
pub fn add_entry(
&mut self,
entry: EntryAndGeneration<I::Addr, D>,
) -> Result<&EntryAndGeneration<I::Addr, D>, ExistsError>where
D: PartialOrd,
Adds entry
to the routing table if it does not already exist.
On success, a reference to the inserted entry is returned.
Trait Implementations§
Source§impl<I: Ip, D> Default for RoutingTable<I, D>
impl<I: Ip, D> Default for RoutingTable<I, D>
Source§fn default() -> RoutingTable<I, D>
fn default() -> RoutingTable<I, D>
Returns the “default value” for a type. Read more
Source§impl<I: Ip, D, IpType> GenericOverIp<IpType> for RoutingTable<I, D>where
IpType: Ip,
impl<I: Ip, D, IpType> GenericOverIp<IpType> for RoutingTable<I, D>where
IpType: Ip,
Source§type Type = RoutingTable<IpType, D>
type Type = RoutingTable<IpType, D>
The type of
Self
when its IP-generic parameter is replaced with the
type NewIp
.Source§impl<I: IpLayerIpExt, D: StrongDeviceIdentifier> OrderedLockAccess<RoutingTable<I, D>> for RoutingTableId<I, D>
impl<I: IpLayerIpExt, D: StrongDeviceIdentifier> OrderedLockAccess<RoutingTable<I, D>> for RoutingTableId<I, D>
Source§type Lock = RwLock<RoutingTable<I, D>>
type Lock = RwLock<RoutingTable<I, D>>
The lock type that observes ordering. Read more
Source§fn ordered_lock_access(&self) -> OrderedLockRef<'_, Self::Lock>
fn ordered_lock_access(&self) -> OrderedLockRef<'_, Self::Lock>
Returns a borrow to the order-aware lock. Read more
Auto Trait Implementations§
impl<I, D> Freeze for RoutingTable<I, D>
impl<I, D> RefUnwindSafe for RoutingTable<I, D>
impl<I, D> Send for RoutingTable<I, D>where
D: Send,
impl<I, D> Sync for RoutingTable<I, D>where
D: Sync,
impl<I, D> Unpin for RoutingTable<I, D>
impl<I, D> UnwindSafe for RoutingTable<I, D>
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
Source§impl<O, BC> BuildableCoreContext<BC> for Owhere
O: Default,
impl<O, BC> BuildableCoreContext<BC> for Owhere
O: Default,
Source§impl<CC, BC, Meta> RecvFrameContext<Meta, BC> for CCwhere
Meta: ReceivableFrameMeta<CC, BC>,
impl<CC, BC, Meta> RecvFrameContext<Meta, BC> for CCwhere
Meta: ReceivableFrameMeta<CC, BC>,
Source§impl<CC, BC, Meta> SendFrameContext<BC, Meta> for CCwhere
Meta: SendableFrameMeta<CC, BC>,
impl<CC, BC, Meta> SendFrameContext<BC, Meta> for CCwhere
Meta: SendableFrameMeta<CC, BC>,
Source§fn send_frame<S>(
&mut self,
bindings_ctx: &mut BC,
metadata: Meta,
frame: S,
) -> Result<(), ErrorAndSerializer<SendFrameErrorReason, S>>where
S: Serializer,
<S as Serializer>::Buffer: BufferMut,
fn send_frame<S>(
&mut self,
bindings_ctx: &mut BC,
metadata: Meta,
frame: S,
) -> Result<(), ErrorAndSerializer<SendFrameErrorReason, S>>where
S: Serializer,
<S as Serializer>::Buffer: BufferMut,
Send a frame. Read more
Source§impl<Id, CC, BC> TimerHandler<BC, Id> for CCwhere
BC: TimerBindingsTypes,
Id: HandleableTimer<CC, BC>,
impl<Id, CC, BC> TimerHandler<BC, Id> for CCwhere
BC: TimerBindingsTypes,
Id: HandleableTimer<CC, BC>,
Source§fn handle_timer(
&mut self,
bindings_ctx: &mut BC,
dispatch: Id,
timer: <BC as TimerBindingsTypes>::UniqueTimerId,
)
fn handle_timer( &mut self, bindings_ctx: &mut BC, dispatch: Id, timer: <BC as TimerBindingsTypes>::UniqueTimerId, )
Handle a timer firing. Read more