Trait NomRange
pub trait NomRange<Idx>
Abstractions for range-like types.
Associated Types
type Saturating: Iterator<Item = Idx>;The saturating iterator type.
type Bounded: Iterator<Item = Idx>;The bounded iterator type.
Required Methods
fn contains(&self, item: &Idx) -> booltrueifitemis contained in the range.fn bounds(&self) -> (Bound<Idx>, Bound<Idx>)Returns the bounds of this range.
fn is_inverted(&self) -> booltrueif the range is inverted.fn saturating_iter(&self) -> Self::SaturatingCreates a saturating iterator. A saturating iterator counts the number of iterations starting from 0 up to the upper bound of this range. If the upper bound is infinite the iterator saturates at the largest representable value of its type and returns it for all further elements.
fn bounded_iter(&self) -> Self::BoundedCreates a bounded iterator. A bounded iterator counts the number of iterations starting from 0 up to the upper bound of this range. If the upper bounds is infinite the iterator counts up until the amount of iterations has reached the largest representable value of its type and then returns
Nonefor all further elements.