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>
impl<'a, BT: BindingsTypes> CoreCtx<'a, BT, Unlocked>
sourcepub fn new(stack_state: &'a StackState<BT>) -> Self
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,
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
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>
impl<BC: BindingsContext, L: LockBefore<FilterState<Ipv4>>> FilterContext<BC> for CoreCtx<'_, BC, L>
source§impl<I: IpExt, BC: BindingsContext, L: LockBefore<FilterState<I>>> FilterIpContext<I, BC> for CoreCtx<'_, BC, L>
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
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.