pub trait IpStateContext<I: IpLayerIpExt>: IpRouteTablesContext<I, DeviceId: DeviceWithName> {
type IpRouteTablesCtx<'a>: IpRouteTablesContext<I, DeviceId = Self::DeviceId>;
// Required methods
fn with_rules_table<O, F: FnOnce(&mut Self::IpRouteTablesCtx<'_>, &RulesTable<I, Self::DeviceId>) -> O>(
&mut self,
cb: F,
) -> O;
fn with_rules_table_mut<O, F: FnOnce(&mut Self::IpRouteTablesCtx<'_>, &mut RulesTable<I, Self::DeviceId>) -> O>(
&mut self,
cb: F,
) -> O;
}
Expand description
The state context provided to the IP layer.
Required Associated Types§
Sourcetype IpRouteTablesCtx<'a>: IpRouteTablesContext<I, DeviceId = Self::DeviceId>
type IpRouteTablesCtx<'a>: IpRouteTablesContext<I, DeviceId = Self::DeviceId>
The context that provides access to the IP routing tables.
Required Methods§
Sourcefn with_rules_table<O, F: FnOnce(&mut Self::IpRouteTablesCtx<'_>, &RulesTable<I, Self::DeviceId>) -> O>(
&mut self,
cb: F,
) -> O
fn with_rules_table<O, F: FnOnce(&mut Self::IpRouteTablesCtx<'_>, &RulesTable<I, Self::DeviceId>) -> O>( &mut self, cb: F, ) -> O
Gets an immutable reference to the rules table.
Sourcefn with_rules_table_mut<O, F: FnOnce(&mut Self::IpRouteTablesCtx<'_>, &mut RulesTable<I, Self::DeviceId>) -> O>(
&mut self,
cb: F,
) -> O
fn with_rules_table_mut<O, F: FnOnce(&mut Self::IpRouteTablesCtx<'_>, &mut RulesTable<I, Self::DeviceId>) -> O>( &mut self, cb: F, ) -> O
Gets a mutable reference to the rules 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.