Trait Incremental

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

Source

fn initial() -> Self

Source

fn get_next(current: &Self) -> Self

Provided Methods§

Source

fn init() -> AutoIncrement<Self>

Source

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

Source

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.

Implementors§