Trait step::Step [] [src]

pub trait Step: Sized {
    fn next(&self) -> Option<Self>;
    fn next_by(&self, by: &Self) -> Option<Self>;
    fn prev(&self) -> Option<Self>;
    fn prev_by(&self, by: &Self) -> Option<Self>;
}

Types that can be incremented or decremented by a unit value or a given value.

Required Methods

Return the next sequential value for the type.

Return the value a given amount after the value.

Return the previous sequential value for the type.

Return the value a given amount before the value.

Implementors