pub trait MulticastRouteTableContext<I: IpLayerIpExt, BT: MulticastForwardingBindingsTypes>: DeviceIdContext<AnyDevice> {
type Ctx<'a>: MulticastForwardingPendingPacketsContext<I, BT, DeviceId = Self::DeviceId, WeakDeviceId = Self::WeakDeviceId> + CounterContext<MulticastForwardingCounters<I>>;
// Required methods
fn with_route_table<O, F: FnOnce(&MulticastRouteTable<I, Self::DeviceId, BT>, &mut Self::Ctx<'_>) -> O>(
&mut self,
state: &MulticastForwardingEnabledState<I, Self::DeviceId, BT>,
cb: F,
) -> O;
fn with_route_table_mut<O, F: FnOnce(&mut MulticastRouteTable<I, Self::DeviceId, BT>, &mut Self::Ctx<'_>) -> O>(
&mut self,
state: &MulticastForwardingEnabledState<I, Self::DeviceId, BT>,
cb: F,
) -> O;
}
Expand description
A trait providing access to MulticastRouteTable
.
Required Associated Types§
Sourcetype Ctx<'a>: MulticastForwardingPendingPacketsContext<I, BT, DeviceId = Self::DeviceId, WeakDeviceId = Self::WeakDeviceId> + CounterContext<MulticastForwardingCounters<I>>
type Ctx<'a>: MulticastForwardingPendingPacketsContext<I, BT, DeviceId = Self::DeviceId, WeakDeviceId = Self::WeakDeviceId> + CounterContext<MulticastForwardingCounters<I>>
The context available after locking the multicast route table.
Required Methods§
Sourcefn with_route_table<O, F: FnOnce(&MulticastRouteTable<I, Self::DeviceId, BT>, &mut Self::Ctx<'_>) -> O>(
&mut self,
state: &MulticastForwardingEnabledState<I, Self::DeviceId, BT>,
cb: F,
) -> O
fn with_route_table<O, F: FnOnce(&MulticastRouteTable<I, Self::DeviceId, BT>, &mut Self::Ctx<'_>) -> O>( &mut self, state: &MulticastForwardingEnabledState<I, Self::DeviceId, BT>, cb: F, ) -> O
Provides immutable access to the route table.
Sourcefn with_route_table_mut<O, F: FnOnce(&mut MulticastRouteTable<I, Self::DeviceId, BT>, &mut Self::Ctx<'_>) -> O>(
&mut self,
state: &MulticastForwardingEnabledState<I, Self::DeviceId, BT>,
cb: F,
) -> O
fn with_route_table_mut<O, F: FnOnce(&mut MulticastRouteTable<I, Self::DeviceId, BT>, &mut Self::Ctx<'_>) -> O>( &mut self, state: &MulticastForwardingEnabledState<I, Self::DeviceId, BT>, cb: F, ) -> O
Provides mutable access to the route table.
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.