Step

Trait Step 

Source
pub trait Step:
    ConstOne
    + ConstZero
    + Copy
    + PartialOrd
    + Ord
    + Mul<Output = Self>
    + MulAssign<Self>
    + CheckedMul
    + Debug
    + ToPrimitive
    + SaturatingAdd
    + SaturatingSub {
    // Provided methods
    fn next(self) -> Self { ... }
    fn prev(self) -> Self { ... }
}
Expand description

Types that support stepping forward and backward with saturating arithmetic.

Provided Methods§

Source

fn next(self) -> Self

Returns the next value.

Source

fn prev(self) -> Self

Returns the previous value.

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> Step for T