Struct Range

struct Range { ... }

A range bounded inclusively for counting parses performed

This is flexible in what can be converted to a [Range]:

# #[cfg(feature = "std")] {
# use winnow::prelude::*;
# use winnow::token::any;
# use winnow::combinator::repeat;
# fn inner(input: &mut &str) -> ModalResult<char> {
#     any.parse_next(input)
# }
# let mut input = "0123456789012345678901234567890123456789";
# let input = &mut input;
let parser: Vec<_> = repeat(5, inner).parse_next(input).unwrap();
# let mut input = "0123456789012345678901234567890123456789";
# let input = &mut input;
let parser: Vec<_> = repeat(.., inner).parse_next(input).unwrap();
# let mut input = "0123456789012345678901234567890123456789";
# let input = &mut input;
let parser: Vec<_> = repeat(1.., inner).parse_next(input).unwrap();
# let mut input = "0123456789012345678901234567890123456789";
# let input = &mut input;
let parser: Vec<_> = repeat(5..8, inner).parse_next(input).unwrap();
# let mut input = "0123456789012345678901234567890123456789";
# let input = &mut input;
let parser: Vec<_> = repeat(5..=8, inner).parse_next(input).unwrap();
# }

Implementations

impl Clone for Range

fn clone(self: &Self) -> Range

impl Copy for Range

impl Debug for Range

fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result

impl Display for Range

fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result

impl Eq for Range

impl Freeze for Range

impl From for Range

fn from(range: RangeInclusive<usize>) -> Self

impl From for Range

fn from(range: Range<usize>) -> Self

impl From for Range

fn from(range: RangeTo<usize>) -> Self

impl From for Range

fn from(fixed: usize) -> Self

impl From for Range

fn from(range: RangeFrom<usize>) -> Self

impl From for Range

fn from(range: RangeToInclusive<usize>) -> Self

impl From for Range

fn from(_: RangeFull) -> Self

impl PartialEq for Range

fn eq(self: &Self, other: &Range) -> bool

impl RangeBounds for Range

fn start_bound(self: &Self) -> Bound<&usize>
fn end_bound(self: &Self) -> Bound<&usize>

impl RefUnwindSafe for Range

impl Send for Range

impl StructuralPartialEq for Range

impl Sync for Range

impl Unpin for Range

impl UnsafeUnpin for Range

impl UnwindSafe for Range

impl<T> Any for Range

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for Range

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for Range

fn borrow_mut(self: &mut Self) -> &mut T

impl<T> CloneToUninit for Range

unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)

impl<T> From for Range

fn from(t: T) -> T

Returns the argument unchanged.

impl<T, U> Into for Range

fn into(self: Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom for Range

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto for Range

fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>