Enum netstack3_core::ip::IpLayerEvent
source · pub enum IpLayerEvent<DeviceId, I>where
I: IpLayerIpExt,{
AddRoute(AddableEntry<<I as Ip>::Addr, DeviceId>),
RemoveRoutes {
subnet: Subnet<<I as Ip>::Addr>,
device: DeviceId,
gateway: Option<SpecifiedAddr<<I as Ip>::Addr>>,
},
MulticastForwarding(MulticastForwardingEvent<I, DeviceId>),
}
Expand description
Events observed at the IP layer.
Variants§
AddRoute(AddableEntry<<I as Ip>::Addr, DeviceId>)
A route needs to be added.
RemoveRoutes
Routes matching these specifiers need to be removed.
Fields
§
device: DeviceId
Outgoing interface
§
gateway: Option<SpecifiedAddr<<I as Ip>::Addr>>
Gateway/next-hop
MulticastForwarding(MulticastForwardingEvent<I, DeviceId>)
The multicast forwarding engine emitted an event.
Implementations§
source§impl<DeviceId, I> IpLayerEvent<DeviceId, I>where
I: IpLayerIpExt,
impl<DeviceId, I> IpLayerEvent<DeviceId, I>where
I: IpLayerIpExt,
sourcepub fn map_device<N, F>(self, map: F) -> IpLayerEvent<N, I>where
F: Fn(DeviceId) -> N,
pub fn map_device<N, F>(self, map: F) -> IpLayerEvent<N, I>where
F: Fn(DeviceId) -> N,
Changes the device id type with map
.
Trait Implementations§
source§impl<DeviceId, I> Debug for IpLayerEvent<DeviceId, I>
impl<DeviceId, I> Debug for IpLayerEvent<DeviceId, I>
source§impl<DeviceId, I> From<MulticastForwardingEvent<I, DeviceId>> for IpLayerEvent<DeviceId, I>where
I: IpLayerIpExt,
impl<DeviceId, I> From<MulticastForwardingEvent<I, DeviceId>> for IpLayerEvent<DeviceId, I>where
I: IpLayerIpExt,
source§fn from(
event: MulticastForwardingEvent<I, DeviceId>,
) -> IpLayerEvent<DeviceId, I>
fn from( event: MulticastForwardingEvent<I, DeviceId>, ) -> IpLayerEvent<DeviceId, I>
Converts to this type from the input type.
source§impl<DeviceId, I, IpType> GenericOverIp<IpType> for IpLayerEvent<DeviceId, I>
impl<DeviceId, I, IpType> GenericOverIp<IpType> for IpLayerEvent<DeviceId, I>
§type Type = IpLayerEvent<DeviceId, IpType>
type Type = IpLayerEvent<DeviceId, IpType>
The type of
Self
when its IP-generic parameter is replaced with the
type NewIp
.source§impl<DeviceId, I> Hash for IpLayerEvent<DeviceId, I>
impl<DeviceId, I> Hash for IpLayerEvent<DeviceId, I>
source§impl<DeviceId, I> PartialEq for IpLayerEvent<DeviceId, I>
impl<DeviceId, I> PartialEq for IpLayerEvent<DeviceId, I>
source§fn eq(&self, other: &IpLayerEvent<DeviceId, I>) -> bool
fn eq(&self, other: &IpLayerEvent<DeviceId, I>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl<DeviceId, I> Eq for IpLayerEvent<DeviceId, I>
impl<DeviceId, I> StructuralPartialEq for IpLayerEvent<DeviceId, I>where
I: IpLayerIpExt,
Auto Trait Implementations§
impl<DeviceId, I> Freeze for IpLayerEvent<DeviceId, I>
impl<DeviceId, I> RefUnwindSafe for IpLayerEvent<DeviceId, I>where
DeviceId: RefUnwindSafe,
<I as Ip>::Addr: RefUnwindSafe,
<I as MulticastRouteIpExt>::SourceAddress: RefUnwindSafe,
<I as MulticastRouteIpExt>::DestinationAddress: RefUnwindSafe,
impl<DeviceId, I> Send for IpLayerEvent<DeviceId, I>
impl<DeviceId, I> Sync for IpLayerEvent<DeviceId, I>
impl<DeviceId, I> Unpin for IpLayerEvent<DeviceId, I>
impl<DeviceId, I> UnwindSafe for IpLayerEvent<DeviceId, I>where
DeviceId: UnwindSafe,
<I as Ip>::Addr: UnwindSafe,
<I as MulticastRouteIpExt>::SourceAddress: UnwindSafe,
<I as MulticastRouteIpExt>::DestinationAddress: 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
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
source§impl<L, T> UnlockedAccess<L> for Twhere
L: UnlockedAccessMarkerFor<T>,
impl<L, T> UnlockedAccess<L> for Twhere
L: UnlockedAccessMarkerFor<T>,
§type Data = <L as UnlockedAccessMarkerFor<T>>::Data
type Data = <L as UnlockedAccessMarkerFor<T>>::Data
The type of state being accessed.
§type Guard<'l> = &'l <L as UnlockedAccessMarkerFor<T>>::Data
where
T: 'l
type Guard<'l> = &'l <L as UnlockedAccessMarkerFor<T>>::Data where T: 'l
A guard providing read access to the data.
source§fn access(&self) -> <T as UnlockedAccess<L>>::Guard<'_>
fn access(&self) -> <T as UnlockedAccess<L>>::Guard<'_>
How to access the state.