pub trait MulticastForwardingStateContext<I: IpLayerIpExt, BT: MulticastForwardingBindingsTypes>: DeviceIdContext<AnyDevice> {
type Ctx<'a>: MulticastRouteTableContext<I, BT, DeviceId = Self::DeviceId, WeakDeviceId = Self::WeakDeviceId> + MulticastForwardingPendingPacketsContext<I, BT, DeviceId = Self::DeviceId, WeakDeviceId = Self::WeakDeviceId> + CounterContext<MulticastForwardingCounters<I>>;
// Required methods
fn with_state<O, F: FnOnce(&MulticastForwardingState<I, Self::DeviceId, BT>, &mut Self::Ctx<'_>) -> O>(
&mut self,
cb: F,
) -> O;
fn with_state_mut<O, F: FnOnce(&mut MulticastForwardingState<I, Self::DeviceId, BT>, &mut Self::Ctx<'_>) -> O>(
&mut self,
cb: F,
) -> O;
}
Expand description
A trait providing access to MulticastForwardingState
.
Required Associated Types§
sourcetype Ctx<'a>: MulticastRouteTableContext<I, BT, DeviceId = Self::DeviceId, WeakDeviceId = Self::WeakDeviceId> + MulticastForwardingPendingPacketsContext<I, BT, DeviceId = Self::DeviceId, WeakDeviceId = Self::WeakDeviceId> + CounterContext<MulticastForwardingCounters<I>>
type Ctx<'a>: MulticastRouteTableContext<I, BT, DeviceId = Self::DeviceId, WeakDeviceId = Self::WeakDeviceId> + MulticastForwardingPendingPacketsContext<I, BT, DeviceId = Self::DeviceId, WeakDeviceId = Self::WeakDeviceId> + CounterContext<MulticastForwardingCounters<I>>
The context available after locking the multicast forwarding state.
Required Methods§
sourcefn with_state<O, F: FnOnce(&MulticastForwardingState<I, Self::DeviceId, BT>, &mut Self::Ctx<'_>) -> O>(
&mut self,
cb: F,
) -> O
fn with_state<O, F: FnOnce(&MulticastForwardingState<I, Self::DeviceId, BT>, &mut Self::Ctx<'_>) -> O>( &mut self, cb: F, ) -> O
Provides immutable access to the state.
sourcefn with_state_mut<O, F: FnOnce(&mut MulticastForwardingState<I, Self::DeviceId, BT>, &mut Self::Ctx<'_>) -> O>(
&mut self,
cb: F,
) -> O
fn with_state_mut<O, F: FnOnce(&mut MulticastForwardingState<I, Self::DeviceId, BT>, &mut Self::Ctx<'_>) -> O>( &mut self, cb: F, ) -> O
Provides mutable access to the state.
Object Safety§
This trait is not object safe.