pub enum IpLayerEvent<DeviceId, I: IpLayerIpExt> {
AddRoute(AddableEntry<I::Addr, DeviceId>),
RemoveRoutes {
subnet: Subnet<I::Addr>,
device: DeviceId,
gateway: Option<SpecifiedAddr<I::Addr>>,
},
MulticastForwarding(MulticastForwardingEvent<I, DeviceId>),
}
Expand description
Events observed at the IP layer.
Variants§
AddRoute(AddableEntry<I::Addr, DeviceId>)
A route needs to be added.
RemoveRoutes
Routes matching these specifiers need to be removed.
MulticastForwarding(MulticastForwardingEvent<I, DeviceId>)
The multicast forwarding engine emitted an event.
Implementations§
Source§impl<DeviceId, I: IpLayerIpExt> IpLayerEvent<DeviceId, I>
impl<DeviceId, I: IpLayerIpExt> IpLayerEvent<DeviceId, I>
Sourcepub fn map_device<N, F: Fn(DeviceId) -> N>(self, map: F) -> IpLayerEvent<N, I>
pub fn map_device<N, F: Fn(DeviceId) -> N>(self, map: F) -> IpLayerEvent<N, I>
Changes the device id type with map
.
Trait Implementations§
Source§impl<DeviceId: Debug, I: Debug + IpLayerIpExt> Debug for IpLayerEvent<DeviceId, I>
impl<DeviceId: Debug, I: Debug + IpLayerIpExt> Debug for IpLayerEvent<DeviceId, I>
Source§impl<DeviceId, I: IpLayerIpExt> From<MulticastForwardingEvent<I, DeviceId>> for IpLayerEvent<DeviceId, I>
impl<DeviceId, I: IpLayerIpExt> From<MulticastForwardingEvent<I, DeviceId>> for IpLayerEvent<DeviceId, I>
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: IpLayerIpExt, IpType> GenericOverIp<IpType> for IpLayerEvent<DeviceId, I>where
IpType: IpLayerIpExt + Ip,
impl<DeviceId, I: IpLayerIpExt, IpType> GenericOverIp<IpType> for IpLayerEvent<DeviceId, I>where
IpType: IpLayerIpExt + Ip,
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: Hash, I: Hash + IpLayerIpExt> Hash for IpLayerEvent<DeviceId, I>
impl<DeviceId: Hash, I: Hash + IpLayerIpExt> Hash for IpLayerEvent<DeviceId, I>
Source§impl<DeviceId: PartialEq, I: PartialEq + IpLayerIpExt> PartialEq for IpLayerEvent<DeviceId, I>
impl<DeviceId: PartialEq, I: PartialEq + IpLayerIpExt> PartialEq for IpLayerEvent<DeviceId, I>
impl<DeviceId: Eq, I: Eq + IpLayerIpExt> Eq for IpLayerEvent<DeviceId, I>
impl<DeviceId, I: IpLayerIpExt> StructuralPartialEq for IpLayerEvent<DeviceId, I>
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