pub struct Range { /* private fields */ }
Expand description
A range bounded inclusively for counting parses performed
This is flexible in what can be converted to a Range:
let parser: Vec<_> = repeat(5, inner).parse_next(input).unwrap();
let parser: Vec<_> = repeat(.., inner).parse_next(input).unwrap();
let parser: Vec<_> = repeat(1.., inner).parse_next(input).unwrap();
let parser: Vec<_> = repeat(5..8, inner).parse_next(input).unwrap();
let parser: Vec<_> = repeat(5..=8, inner).parse_next(input).unwrap();
Trait Implementations§
Source§impl From<RangeInclusive<usize>> for Range
impl From<RangeInclusive<usize>> for Range
Source§fn from(range: RangeInclusive<usize>) -> Self
fn from(range: RangeInclusive<usize>) -> Self
Converts to this type from the input type.
Source§impl From<RangeToInclusive<usize>> for Range
impl From<RangeToInclusive<usize>> for Range
Source§fn from(range: RangeToInclusive<usize>) -> Self
fn from(range: RangeToInclusive<usize>) -> Self
Converts to this type from the input type.
impl Eq for Range
impl StructuralPartialEq for Range
Auto Trait Implementations§
impl Freeze for Range
impl RefUnwindSafe for Range
impl Send for Range
impl Sync for Range
impl Unpin for Range
impl UnwindSafe for Range
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more