Trait AsyncIncremental

Source
pub trait AsyncIncremental: Sized {
    type Atomic: Atomic;

    // Required methods
    fn initial() -> Self;
    fn get_next(atomic: &Self::Atomic) -> Self;
    fn into_atomic(value: Self) -> Self::Atomic;
    fn from_inner(inner: <Self::Atomic as Atomic>::Inner) -> Self;

    // Provided methods
    fn init() -> AsyncIncrement<Self> { ... }
    fn init_with(value: Self) -> AsyncIncrement<Self> { ... }
    fn init_from(self) -> AsyncIncrement<Self> { ... }
}
Expand description

Trait for implementing over thread-safe incremental types

Required Associated Types§

Required Methods§

Source

fn initial() -> Self

Source

fn get_next(atomic: &Self::Atomic) -> Self

Source

fn into_atomic(value: Self) -> Self::Atomic

Source

fn from_inner(inner: <Self::Atomic as Atomic>::Inner) -> Self

Provided Methods§

Source

fn init() -> AsyncIncrement<Self>

Source

fn init_with(value: Self) -> AsyncIncrement<Self>

Source

fn init_from(self) -> AsyncIncrement<Self>

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§