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§

source

type IpRouteTablesCtx<'a>: IpRouteTablesContext<I, DeviceId = Self::DeviceId>

The context that provides access to the IP routing tables.

Required Methods§

source

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.

source

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.

Implementors§