Type Alias netstack3_core::CoreCtx

source ·
pub type CoreCtx<'a, BT, L> = Locked<&'a StackState<BT>, L>;
Expand description

Provides access to core context implementations.

L is the current lock level of CoreCtx. The alias UnlockedCoreCtx is provided at the Unlocked level.

Aliased Type§

struct CoreCtx<'a, BT, L>(/* private fields */);

Implementations§

source§

impl<'a, BT: BindingsTypes> CoreCtx<'a, BT, Unlocked>

source

pub fn new(stack_state: &'a StackState<BT>) -> Self

Creates a new CoreCtx from a borrowed [StackState].

Trait Implementations§

source§

impl<'a, BT, L> CoreTimerContext<Infallible, BT> for CoreCtx<'a, BT, L>
where BT: BindingsTypes,

source§

fn convert_timer(dispatch_id: Never) -> <BT as TimerBindingsTypes>::DispatchId

Converts an inner timer to the bindings timer type.
source§

impl<BC: BindingsContext, L: LockBefore<FilterState<Ipv4>>> FilterContext<BC> for CoreCtx<'_, BC, L>

source§

fn with_all_filter_state_mut<O, F: FnOnce(&mut State<Ipv4, BC>, &mut State<Ipv6, BC>) -> O>( &mut self, cb: F ) -> O

Calls the function with a mutable reference to all filtering state.
source§

impl<I: IpExt, BC: BindingsContext, L: LockBefore<FilterState<I>>> FilterIpContext<I, BC> for CoreCtx<'_, BC, L>

source§

fn with_filter_state<O, F: FnOnce(&State<I, BC>) -> O>(&mut self, cb: F) -> O

Calls the function with a reference to filtering state.