Struct netstack3_base::testutil::FakeInstantCtx
source · pub struct FakeInstantCtx {
pub time: FakeInstant,
}
Expand description
A fake InstantContext
which stores the current time as a
FakeInstant
.
Fields§
§time: FakeInstant
The fake instant held by this fake context.
Implementations§
Trait Implementations§
source§impl<Id, Event: Debug, State, FrameMeta> AsRef<FakeInstantCtx> for FakeBindingsCtx<Id, Event, State, FrameMeta>
impl<Id, Event: Debug, State, FrameMeta> AsRef<FakeInstantCtx> for FakeBindingsCtx<Id, Event, State, FrameMeta>
source§fn as_ref(&self) -> &FakeInstantCtx
fn as_ref(&self) -> &FakeInstantCtx
Converts this type into a shared reference of the (usually inferred) input type.
source§impl<Id> AsRef<FakeInstantCtx> for FakeTimerCtx<Id>
impl<Id> AsRef<FakeInstantCtx> for FakeTimerCtx<Id>
source§fn as_ref(&self) -> &FakeInstantCtx
fn as_ref(&self) -> &FakeInstantCtx
Converts this type into a shared reference of the (usually inferred) input type.
source§impl Default for FakeInstantCtx
impl Default for FakeInstantCtx
source§fn default() -> FakeInstantCtx
fn default() -> FakeInstantCtx
Returns the “default value” for a type. Read more
source§impl InstantBindingsTypes for FakeInstantCtx
impl InstantBindingsTypes for FakeInstantCtx
§type Instant = FakeInstant
type Instant = FakeInstant
The type of an instant in time. Read more
source§impl InstantContext for FakeInstantCtx
impl InstantContext for FakeInstantCtx
source§fn now(&self) -> FakeInstant
fn now(&self) -> FakeInstant
Returns the current instant. Read more
Auto Trait Implementations§
impl Freeze for FakeInstantCtx
impl RefUnwindSafe for FakeInstantCtx
impl Send for FakeInstantCtx
impl Sync for FakeInstantCtx
impl Unpin for FakeInstantCtx
impl UnwindSafe for FakeInstantCtx
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<CC, BC, Meta> RecvFrameContext<BC, Meta> for CCwhere
Meta: ReceivableFrameMeta<CC, BC>,
impl<CC, BC, Meta> RecvFrameContext<BC, Meta> for CCwhere
Meta: ReceivableFrameMeta<CC, BC>,
source§impl<CC, BC, Meta> SendFrameContext<BC, Meta> for CCwhere
Meta: SendableFrameMeta<CC, BC>,
impl<CC, BC, Meta> SendFrameContext<BC, Meta> for CCwhere
Meta: SendableFrameMeta<CC, BC>,
source§impl<Meta, BC> SendableFrameMeta<FakeFrameCtx<Meta>, BC> for Meta
impl<Meta, BC> SendableFrameMeta<FakeFrameCtx<Meta>, BC> for Meta
source§impl<Id, CC, BC> TimerHandler<BC, Id> for CCwhere
Id: HandleableTimer<CC, BC>,
impl<Id, CC, BC> TimerHandler<BC, Id> for CCwhere
Id: HandleableTimer<CC, BC>,
source§fn handle_timer(&mut self, bindings_ctx: &mut BC, id: Id)
fn handle_timer(&mut self, bindings_ctx: &mut BC, id: Id)
Handle a timer firing.