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.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.