Step

Trait Step 

Source
pub trait Step: PartialOrd {
    const MIN: Self;
    const MAX: Self;

    // Required methods
    fn next(&self) -> Option<Self>
       where Self: Sized;
    fn prev(&self) -> Option<Self>
       where Self: Sized;
}
Expand description

Step trait, used as a base for creating iterators

Required Associated Constants§

Source

const MIN: Self

Smallest value of Self

Source

const MAX: Self

Largest value of Self

Required Methods§

Source

fn next(&self) -> Option<Self>
where Self: Sized,

Produce the next smallest value of Self

Source

fn prev(&self) -> Option<Self>
where Self: Sized,

Produce the next largest value of 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§