Trait netstack3_ip::IpStateContext
source · 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.
Object Safety§
This trait is not object safe.