std::iter::Step

Trait std::iter::Step

pub trait Step: PartialOrd<Self> {
    fn step(&self, by: &Self) -> Option<Self>;
    fn steps_between(start: &Self, end: &Self, by: &Self) -> Option<usize>;
    fn steps_between_by_one(start: &Self, end: &Self) -> Option<usize>;
    fn is_negative(&self) -> bool;
    fn replace_one(&mut self) -> Self;
    fn replace_zero(&mut self) -> Self;
    fn add_one(&self) -> Self;
    fn sub_one(&self) -> Self;
}
???? This is a nightly-only experimental API. (step_trait #27741)likely to be replaced by finer-grained traits

Objects that can be stepped over in both directions.

The steps_between function provides a way to efficiently compare two Step objects.

Required Methods

<