Type Alias netstack3_core::testutil::FakeCtx

source ·
pub type FakeCtx = Ctx<FakeBindingsCtx>;
Expand description

Shorthand for Ctx with a FakeBindingsCtx.

Aliased Type§

struct FakeCtx {
    pub core_ctx: StackState<FakeBindingsCtx>,
    pub bindings_ctx: FakeBindingsCtx,
}

Fields§

§core_ctx: StackState<FakeBindingsCtx>

The core context.

§bindings_ctx: FakeBindingsCtx

The bindings context.

Trait Implementations§

source§

impl WithFakeTimerContext<TimerId<FakeBindingsCtx>> for FakeCtx

source§

fn with_fake_timer_ctx<O, F: FnOnce(&FakeTimerCtx<TimerId<FakeBindingsCtx>>) -> O>( &self, f: F ) -> O

Calls the callback with a borrow of FakeTimerCtx.
source§

fn with_fake_timer_ctx_mut<O, F: FnOnce(&mut FakeTimerCtx<TimerId<FakeBindingsCtx>>) -> O>( &mut self, f: F ) -> O

Calls the callback with a mutable borrow of FakeTimerCtx.