pub trait WithFakeTimerContext<TimerId> {
    // Required methods
    fn with_fake_timer_ctx<O, F: FnOnce(&FakeTimerCtx<TimerId>) -> O>(
        &self,
        f: F
    ) -> O;
    fn with_fake_timer_ctx_mut<O, F: FnOnce(&mut FakeTimerCtx<TimerId>) -> O>(
        &mut self,
        f: F
    ) -> O;
}
Expand description

A trait abstracting access to a FakeTimerCtx instance.

Required Methods§

source

fn with_fake_timer_ctx<O, F: FnOnce(&FakeTimerCtx<TimerId>) -> 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>) -> O>( &mut self, f: F ) -> O

Calls the callback with a mutable borrow of FakeTimerCtx.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<TimerId> WithFakeTimerContext<TimerId> for FakeTimerCtx<TimerId>

source§

impl<TimerId, Event: Debug, State, FrameMeta> WithFakeTimerContext<TimerId> for FakeBindingsCtx<TimerId, Event, State, FrameMeta>