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
fn next(&self) -> Option<Self>
Return the next sequential value for the type.
fn next_by(&self, by: &Self) -> Option<Self>
Return the value a given amount after the value.
fn prev(&self) -> Option<Self>
Return the previous sequential value for the type.
fn prev_by(&self, by: &Self) -> Option<Self>
Return the value a given amount before the value.