pub struct Repeat<T, const MIN: usize, const MAX: usize> { /* private fields */ }Expand description
Parses T between MIN and MAX times, inclusive.
MIN must be less than or equal to MAX.
Implementations§
Trait Implementations§
impl<T: Eq, const MIN: usize, const MAX: usize> Eq for Repeat<T, MIN, MAX>
Source§impl<T: Ord, const MIN: usize, const MAX: usize> Ord for Repeat<T, MIN, MAX>
impl<T: Ord, const MIN: usize, const MAX: usize> Ord for Repeat<T, MIN, MAX>
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl<'a, I, T, const MIN: usize, const MAX: usize> Parse<'a, I> for Repeat<T, MIN, MAX>
impl<'a, I, T, const MIN: usize, const MAX: usize> Parse<'a, I> for Repeat<T, MIN, MAX>
Source§fn parse_with_context(
input: I,
context: &mut ParseOffsetContext,
) -> ParseResult<(Self, I)>
fn parse_with_context( input: I, context: &mut ParseOffsetContext, ) -> ParseResult<(Self, I)>
Parse a value from the input using an explicit offset context.
Source§fn parse(input: I) -> ParseResult<(Self, I)>where
I: ParseOffsetInput<'a>,
fn parse(input: I) -> ParseResult<(Self, I)>where
I: ParseOffsetInput<'a>,
Parse a value from the input. Read more
Source§impl<T: PartialOrd, const MIN: usize, const MAX: usize> PartialOrd for Repeat<T, MIN, MAX>
impl<T: PartialOrd, const MIN: usize, const MAX: usize> PartialOrd for Repeat<T, MIN, MAX>
impl<T: PartialEq, const MIN: usize, const MAX: usize> StructuralPartialEq for Repeat<T, MIN, MAX>
Auto Trait Implementations§
impl<T, const MIN: usize, const MAX: usize> Forget for Repeat<T, MIN, MAX>
impl<T, const MIN: usize, const MAX: usize> Freeze for Repeat<T, MIN, MAX>
impl<T, const MIN: usize, const MAX: usize> Move for Repeat<T, MIN, MAX>
impl<T, const MIN: usize, const MAX: usize> RefUnwindSafe for Repeat<T, MIN, MAX>where
T: RefUnwindSafe,
impl<T, const MIN: usize, const MAX: usize> Send for Repeat<T, MIN, MAX>
impl<T, const MIN: usize, const MAX: usize> Sync for Repeat<T, MIN, MAX>
impl<T, const MIN: usize, const MAX: usize> Unpin for Repeat<T, MIN, MAX>
impl<T, const MIN: usize, const MAX: usize> UnsafeUnpin for Repeat<T, MIN, MAX>
impl<T, const MIN: usize, const MAX: usize> UnwindSafe for Repeat<T, MIN, MAX>where
RawVecInner: UnwindSafe,
T: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<'a, I, T> ParseExt<'a, I> for T
impl<'a, I, T> ParseExt<'a, I> for T
Source§fn parse_complete(input: I) -> ParseResult<Self>where
I: ParseOffsetInput<'a>,
fn parse_complete(input: I) -> ParseResult<Self>where
I: ParseOffsetInput<'a>,
Parses a value and requires all input to be consumed.
Source§fn parse_prefix(input: I) -> ParseResult<(Self, I)>where
I: ParseOffsetInput<'a>,
fn parse_prefix(input: I) -> ParseResult<(Self, I)>where
I: ParseOffsetInput<'a>,
Parses a value and returns the remaining input.
Source§impl<T> SpacedExt for T
impl<T> SpacedExt for T
Source§fn parse_spaced<'a, I>(input: I) -> ParseResult<(Self::Spaced, I)>
fn parse_spaced<'a, I>(input: I) -> ParseResult<(Self::Spaced, I)>
Parses
Self after trimming leading and trailing whitespace.Source§impl<T> SpanExt for T
impl<T> SpanExt for T
Source§fn parse_spanned<'a, I>(input: I) -> ParseResult<(Self::Spanned, I)>
fn parse_spanned<'a, I>(input: I) -> ParseResult<(Self::Spanned, I)>
Parse
Self and return the parsed value wrapped with its consumed span.Source§impl<T> WsExt for T
impl<T> WsExt for T
Source§type Whitespaced = Ws<T>
type Whitespaced = Ws<T>
Parser output wrapped with leading-whitespace handling.
Source§fn parse_ws<'a, I>(input: I) -> ParseResult<(Self::Whitespaced, I)>
fn parse_ws<'a, I>(input: I) -> ParseResult<(Self::Whitespaced, I)>
Parses
Self after trimming leading whitespace.