netstack3_icmp_echo

Trait IcmpEchoBoundStateContext

Source
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§

Source

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§

Source

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.

Implementors§