netstack3_core

Trait AtomicInstant

Source
pub trait AtomicInstant<I>: Debug
where I: Instant,
{ // Required methods fn new(instant: I) -> Self; fn load(&self, ordering: Ordering) -> I; fn store(&self, instant: I, ordering: Ordering); fn store_max(&self, instant: I, ordering: Ordering); }
Expand description

A type representing an instant in time that can be atomically updated.

Required Methods§

Source

fn new(instant: I) -> Self

Instantiates Self from the given instant.

Source

fn load(&self, ordering: Ordering) -> I

Loads an Instant, atomically.

Source

fn store(&self, instant: I, ordering: Ordering)

Stores an Instant, atomically,

Source

fn store_max(&self, instant: I, ordering: Ordering)

Store the maximum of the current value and the provided value.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§