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>
Source§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>
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>,
Source§type Data = <L as UnlockedAccessMarkerFor<T>>::Data
type Data = <L as UnlockedAccessMarkerFor<T>>::Data
The type of state being accessed.
Source§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.