pub trait IcmpEchoBoundStateContext<I: IcmpIpExt + IpExt, BC: IcmpEchoBindingsTypes>: DeviceIdContext<AnyDevice> + IcmpEchoContextMarker {
type IpSocketsCtx<'a>: TransportIpContext<I, BC> + MulticastMembershipHandler<I, BC> + DeviceIdContext<AnyDevice, DeviceId = Self::DeviceId, WeakDeviceId = Self::WeakDeviceId> + CounterContext<IcmpRxCounters<I>>;
// Required method
fn with_icmp_ctx_and_sockets_mut<O, F: FnOnce(&mut Self::IpSocketsCtx<'_>, &mut BoundSockets<I, Self::WeakDeviceId, BC>) -> O>(
&mut self,
cb: F,
) -> O;
}
Expand description
A Context that provides access to the sockets’ states.
Required Associated Types§
sourcetype IpSocketsCtx<'a>: TransportIpContext<I, BC> + MulticastMembershipHandler<I, BC> + DeviceIdContext<AnyDevice, DeviceId = Self::DeviceId, WeakDeviceId = Self::WeakDeviceId> + CounterContext<IcmpRxCounters<I>>
type IpSocketsCtx<'a>: TransportIpContext<I, BC> + MulticastMembershipHandler<I, BC> + DeviceIdContext<AnyDevice, DeviceId = Self::DeviceId, WeakDeviceId = Self::WeakDeviceId> + CounterContext<IcmpRxCounters<I>>
The inner context providing IP socket access.
Required Methods§
sourcefn with_icmp_ctx_and_sockets_mut<O, F: FnOnce(&mut Self::IpSocketsCtx<'_>, &mut BoundSockets<I, Self::WeakDeviceId, BC>) -> O>(
&mut self,
cb: F,
) -> O
fn with_icmp_ctx_and_sockets_mut<O, F: FnOnce(&mut Self::IpSocketsCtx<'_>, &mut BoundSockets<I, Self::WeakDeviceId, BC>) -> O>( &mut self, cb: F, ) -> O
Calls the function with a mutable reference to IpSocketsCtx
and
a mutable reference to ICMP sockets.
Object Safety§
This trait is not object safe.