Trait Increment

Source
pub trait Increment {
    // Required method
    fn increment(self) -> Self;
}
Expand description

Increment is a trait that provides a common interface for incrementing values; i.e., adding one to a value.

Required Methods§

Source

fn increment(self) -> 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§

Source§

impl<T> Increment for T
where T: One + Add<Output = T>,