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§
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>
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.