Type Alias netstack3_core::testutil::Ctx
source · pub type Ctx<BT> = ContextPair<StackState<BT>, BT>;
Expand description
Context available during the execution of the netstack.
Aliased Type§
struct Ctx<BT> {
pub core_ctx: StackState<BT>,
pub bindings_ctx: BT,
}
Fields§
§core_ctx: StackState<BT>
The core context.
bindings_ctx: BT
The bindings context.
Implementations§
source§impl<BC: BindingsTypes> Ctx<BC>
impl<BC: BindingsTypes> Ctx<BC>
Helper functions for dealing with fake timers.
sourcepub fn trigger_next_timer<Id>(&mut self) -> Option<Id>
pub fn trigger_next_timer<Id>(&mut self) -> Option<Id>
Shortcut for FakeTimerCtxExt::trigger_next_timer
.
sourcepub fn trigger_timers_for<Id>(&mut self, duration: Duration) -> Vec<Id>
pub fn trigger_timers_for<Id>(&mut self, duration: Duration) -> Vec<Id>
Shortcut for FakeTimerCtxExt::trigger_timers_for
.
sourcepub fn trigger_timers_until_instant<Id>(
&mut self,
instant: FakeInstant
) -> Vec<Id>
pub fn trigger_timers_until_instant<Id>( &mut self, instant: FakeInstant ) -> Vec<Id>
Shortcut for [FaketimerCtx::trigger_timers_until_instant
].