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.
source§impl PartialEq for Range
impl PartialEq for Range
impl Eq for Range
impl StructuralPartialEq for Range
Auto Trait Implementations§
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