pub trait Atomic<N> {
    // Required methods
    fn inc(&self) -> N;
    fn inc_by(&self, v: N) -> N;
    fn get(&self) -> N;
}
Expand description

Atomic operations for a Counter value store.

Required Methods§

source

fn inc(&self) -> N

Increase the value by 1.

source

fn inc_by(&self, v: N) -> N

Increase the value.

source

fn get(&self) -> N

Get the the value.

Implementations on Foreign Types§

source§

impl Atomic<u64> for AtomicU64

source§

fn inc(&self) -> u64

source§

fn inc_by(&self, v: u64) -> u64

source§

fn get(&self) -> u64

source§

impl Atomic<u32> for AtomicU32

source§

fn inc(&self) -> u32

source§

fn inc_by(&self, v: u32) -> u32

source§

fn get(&self) -> u32

source§

impl Atomic<f64> for AtomicU64

source§

fn inc(&self) -> f64

source§

fn inc_by(&self, v: f64) -> f64

source§

fn get(&self) -> f64

Implementors§