Trait netstack3_ip::raw::RawIpSocketMapContext
source · pub trait RawIpSocketMapContext<I: IpExt, BT: RawIpSocketsBindingsTypes>: DeviceIdContext<AnyDevice> {
type StateCtx<'a>: RawIpSocketStateContext<I, BT, DeviceId = Self::DeviceId, WeakDeviceId = Self::WeakDeviceId> + ResourceCounterContext<RawIpSocketId<I, Self::WeakDeviceId, BT>, RawIpSocketCounters<I>>;
// Required methods
fn with_socket_map_and_state_ctx<O, F: FnOnce(&RawIpSocketMap<I, Self::WeakDeviceId, BT>, &mut Self::StateCtx<'_>) -> O>(
&mut self,
cb: F,
) -> O;
fn with_socket_map_mut<O, F: FnOnce(&mut RawIpSocketMap<I, Self::WeakDeviceId, BT>) -> O>(
&mut self,
cb: F,
) -> O;
}
Expand description
A type that provides access to the RawIpSocketMap
used by the system.
Required Associated Types§
sourcetype StateCtx<'a>: RawIpSocketStateContext<I, BT, DeviceId = Self::DeviceId, WeakDeviceId = Self::WeakDeviceId> + ResourceCounterContext<RawIpSocketId<I, Self::WeakDeviceId, BT>, RawIpSocketCounters<I>>
type StateCtx<'a>: RawIpSocketStateContext<I, BT, DeviceId = Self::DeviceId, WeakDeviceId = Self::WeakDeviceId> + ResourceCounterContext<RawIpSocketId<I, Self::WeakDeviceId, BT>, RawIpSocketCounters<I>>
The implementation of RawIpSocketStateContext
available after having
accessed the system’s socket map.
Required Methods§
sourcefn with_socket_map_and_state_ctx<O, F: FnOnce(&RawIpSocketMap<I, Self::WeakDeviceId, BT>, &mut Self::StateCtx<'_>) -> O>(
&mut self,
cb: F,
) -> O
fn with_socket_map_and_state_ctx<O, F: FnOnce(&RawIpSocketMap<I, Self::WeakDeviceId, BT>, &mut Self::StateCtx<'_>) -> O>( &mut self, cb: F, ) -> O
Calls the callback with an immutable reference to the socket map.
sourcefn with_socket_map_mut<O, F: FnOnce(&mut RawIpSocketMap<I, Self::WeakDeviceId, BT>) -> O>(
&mut self,
cb: F,
) -> O
fn with_socket_map_mut<O, F: FnOnce(&mut RawIpSocketMap<I, Self::WeakDeviceId, BT>) -> O>( &mut self, cb: F, ) -> O
Calls the callback with a mutable reference to the socket map.
Object Safety§
This trait is not object safe.