netstack3_core

Trait InstantBindingsTypes

Source
pub trait InstantBindingsTypes {
    type Instant: Instant + 'static;
    type AtomicInstant: AtomicInstant<Self::Instant>;
}
Expand description

Trait defining the Instant type provided by bindings’ InstantContext implementation.

It is a separate trait from InstantContext so the type stands by itself to be stored at rest in core structures.

Required Associated Types§

Source

type Instant: Instant + 'static

The type of an instant in time.

All time is measured using Instants, including scheduling timers through TimerContext. This type may represent some sort of real-world time (e.g., [std::time::Instant]), or may be faked in testing using a fake clock.

Source

type AtomicInstant: AtomicInstant<Self::Instant>

An atomic representation of Self::Instant.

Implementors§