Struct netstack3_core::testutil::context::InstantAndData
source · pub struct InstantAndData<D>(pub FakeInstant, pub D);
Expand description
Arbitrary data of type D
attached to a FakeInstant
.
InstantAndData
implements Ord
and Eq
to be used in a BinaryHeap
and ordered by FakeInstant
.
Tuple Fields§
§0: FakeInstant
§1: D
Implementations§
source§impl<D> InstantAndData<D>
impl<D> InstantAndData<D>
sourcepub fn new(time: FakeInstant, data: D) -> InstantAndData<D>
pub fn new(time: FakeInstant, data: D) -> InstantAndData<D>
Creates a new InstantAndData
.
Trait Implementations§
source§impl<D> Clone for InstantAndData<D>where
D: Clone,
impl<D> Clone for InstantAndData<D>where
D: Clone,
source§fn clone(&self) -> InstantAndData<D>
fn clone(&self) -> InstantAndData<D>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<D> Debug for InstantAndData<D>where
D: Debug,
impl<D> Debug for InstantAndData<D>where
D: Debug,
source§impl<D> Ord for InstantAndData<D>
impl<D> Ord for InstantAndData<D>
source§fn cmp(&self, other: &InstantAndData<D>) -> Ordering
fn cmp(&self, other: &InstantAndData<D>) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl<D> PartialEq for InstantAndData<D>
impl<D> PartialEq for InstantAndData<D>
source§fn eq(&self, other: &InstantAndData<D>) -> bool
fn eq(&self, other: &InstantAndData<D>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<D> PartialOrd for InstantAndData<D>
impl<D> PartialOrd for InstantAndData<D>
source§fn partial_cmp(&self, other: &InstantAndData<D>) -> Option<Ordering>
fn partial_cmp(&self, other: &InstantAndData<D>) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl<D> Eq for InstantAndData<D>
Auto Trait Implementations§
impl<D> Freeze for InstantAndData<D>where
D: Freeze,
impl<D> RefUnwindSafe for InstantAndData<D>where
D: RefUnwindSafe,
impl<D> Send for InstantAndData<D>where
D: Send,
impl<D> Sync for InstantAndData<D>where
D: Sync,
impl<D> Unpin for InstantAndData<D>where
D: Unpin,
impl<D> UnwindSafe for InstantAndData<D>where
D: UnwindSafe,
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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.