pub trait Incremental: Sized {
// Required methods
fn initial() -> Self;
fn get_next(current: &Self) -> Self;
// Provided methods
fn init() -> AutoIncrement<Self> { ... }
fn init_with(value: Self) -> AutoIncrement<Self> { ... }
fn init_from(self) -> AutoIncrement<Self> { ... }
}
Expand description
Trait for implementing over non-thread-safe incremental types
Required Methods§
Provided Methods§
fn init() -> AutoIncrement<Self>
fn init_with(value: Self) -> AutoIncrement<Self>
fn init_from(self) -> AutoIncrement<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.