pub struct FlatUntil<P, Q> { /* private fields */ }Expand description
A iterable parser generated from method flat_until.
Implementations§
Trait Implementations§
Source§impl<P, Q, I> IterableParser<I> for FlatUntil<P, Q>
impl<P, Q, I> IterableParser<I> for FlatUntil<P, Q>
Source§type Item = <P as IterableParser<I>>::Item
type Item = <P as IterableParser<I>>::Item
The type for items of input stream.
Source§type State = FlatUntilState<I, P, Q>
type State = FlatUntilState<I, P, Q>
The internal state used in
poll_parse_next. Read moreSource§fn poll_parse_next(
&mut self,
input: Pin<&mut I>,
cx: &mut Context<'_>,
state: &mut Self::State,
) -> PolledResult<Option<Self::Item>, I>
fn poll_parse_next( &mut self, input: Pin<&mut I>, cx: &mut Context<'_>, state: &mut Self::State, ) -> PolledResult<Option<Self::Item>, I>
Source§impl<P: PartialEq, Q: PartialEq> PartialEq for FlatUntil<P, Q>
impl<P: PartialEq, Q: PartialEq> PartialEq for FlatUntil<P, Q>
impl<P: Eq, Q: Eq> Eq for FlatUntil<P, Q>
impl<P, Q> StructuralPartialEq for FlatUntil<P, Q>
Auto Trait Implementations§
impl<P, Q> Freeze for FlatUntil<P, Q>
impl<P, Q> RefUnwindSafe for FlatUntil<P, Q>where
P: RefUnwindSafe,
Q: RefUnwindSafe,
impl<P, Q> Send for FlatUntil<P, Q>
impl<P, Q> Sync for FlatUntil<P, Q>
impl<P, Q> Unpin for FlatUntil<P, Q>
impl<P, Q> UnsafeUnpin for FlatUntil<P, Q>where
P: UnsafeUnpin,
Q: UnsafeUnpin,
impl<P, Q> UnwindSafe for FlatUntil<P, Q>where
P: UnwindSafe,
Q: 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<P, I> IterableParserExt<I> for P
impl<P, I> IterableParserExt<I> for P
Source§fn parse_iterable<'a, 'b>(
&'a mut self,
input: &'b mut I,
) -> IterableParserStream<'a, 'b, Self, I, Self::State>where
I: Unpin,
fn parse_iterable<'a, 'b>(
&'a mut self,
input: &'b mut I,
) -> IterableParserStream<'a, 'b, Self, I, Self::State>where
I: Unpin,
Returns a
TryStream by invoking poll_parse_next.Source§fn boxed<'a>(
self,
) -> Box<dyn IterableParser<I, Item = Self::Item, State = Self::State> + 'a>where
Self: Sized + 'a,
fn boxed<'a>(
self,
) -> Box<dyn IterableParser<I, Item = Self::Item, State = Self::State> + 'a>where
Self: Sized + 'a,
Available on crate feature
alloc only.Wraps the parser into a
Box.Source§fn no_state(self) -> NoState<Self, Self::State>where
Self: Sized,
fn no_state(self) -> NoState<Self, Self::State>where
Self: Sized,
Merges
State into the parser itself.Source§fn left<R>(self) -> Either<Self, R> ⓘ
fn left<R>(self) -> Either<Self, R> ⓘ
Wraps the parser into a
Either to merge multiple types of parsers.Source§fn right<L>(self) -> Either<L, Self> ⓘ
fn right<L>(self) -> Either<L, Self> ⓘ
Wraps the parser into a
Either to merge multiple types of parsers.Source§fn complete(self) -> Skip<Self, Eof<I>> ⓘwhere
Self: Sized,
fn complete(self) -> Skip<Self, Eof<I>> ⓘwhere
Self: Sized,
Parses the input completedly. Read more
Source§fn chain<P>(self, p: P) -> (Self, P) ⓘ
fn chain<P>(self, p: P) -> (Self, P) ⓘ
Chains two iterable parsers and parses items in sequence.
Source§fn or<P>(self, p: P) -> Or<Self, P> ⓘ
fn or<P>(self, p: P) -> Or<Self, P> ⓘ
Tries another parser if the first parser failed parsing.
Source§fn between<L, R>(self, left: L, right: R) -> Skip<Prefix<L, Self>, R> ⓘ
fn between<L, R>(self, left: L, right: R) -> Skip<Prefix<L, Self>, R> ⓘ
Parses with
self between left and right.Source§fn discard(self) -> Discard<Self> ⓘwhere
Self: Sized,
fn discard(self) -> Discard<Self> ⓘwhere
Self: Sized,
Returns a
Parser parses all items and returns ().Source§fn collect<E: Default + Extend<Self::Item>>(self) -> Collect<Self, E> ⓘwhere
Self: Sized,
fn collect<E: Default + Extend<Self::Item>>(self) -> Collect<Self, E> ⓘwhere
Self: Sized,
Returns a
Parser by collecting all the outputs.Source§fn first(self) -> Nth<Self> ⓘwhere
Self: Sized,
fn first(self) -> Nth<Self> ⓘwhere
Self: Sized,
Consumes all outputs, returns the first element. Read more
Source§fn last(self) -> Last<Self> ⓘwhere
Self: Sized,
fn last(self) -> Last<Self> ⓘwhere
Self: Sized,
Consumes all outputs, returns the last element. Read more
Source§fn nth(self, n: usize) -> Nth<Self> ⓘwhere
Self: Sized,
fn nth(self, n: usize) -> Nth<Self> ⓘwhere
Self: Sized,
Consumes all outputs, returns the
nth element. Read moreSource§fn indices<const N: usize>(self, ns: [usize; N]) -> Indices<Self, N> ⓘwhere
Self: Sized,
fn indices<const N: usize>(self, ns: [usize; N]) -> Indices<Self, N> ⓘwhere
Self: Sized,
Consumes all outputs, returns multiple elements specified by
ns, an ascending ordered array of
indices. Read moreSource§fn flat_repeat<R>(self, range: R) -> FlatRepeat<Self, R> ⓘ
fn flat_repeat<R>(self, range: R) -> FlatRepeat<Self, R> ⓘ
Repeats the iterable parser like
ParserExt::repeat, and flattens into one iterable
parser.Source§fn flat_times(self, n: usize) -> FlatTimes<Self> ⓘwhere
Self: Sized,
fn flat_times(self, n: usize) -> FlatTimes<Self> ⓘwhere
Self: Sized,
Repeats the iterable parser like
ParserExt::times, and flattens into one iterable
parser.Source§fn flat_sep_by<P, R>(self, sep: P, range: R) -> FlatSepBy<Self, P, R> ⓘ
fn flat_sep_by<P, R>(self, sep: P, range: R) -> FlatSepBy<Self, P, R> ⓘ
Repeats the iterable parser with separaters like
ParserExt::sep_by, and flattens into one
iterable parser.Source§fn flat_sep_by_end<P, R>(self, sep: P, range: R) -> FlatSepByEnd<Self, P, R> ⓘ
fn flat_sep_by_end<P, R>(self, sep: P, range: R) -> FlatSepByEnd<Self, P, R> ⓘ
Repeats the iterable parser with separaters like
ParserExt::sep_by_end, and flattens
into one iterable parser.Source§fn flat_sep_by_times<P>(self, sep: P, count: usize) -> FlatSepByTimes<Self, P> ⓘ
fn flat_sep_by_times<P>(self, sep: P, count: usize) -> FlatSepByTimes<Self, P> ⓘ
Repeats the iterable parser with separaters like
ParserExt::sep_by_times, and flattens
into one iterable parser.Source§fn flat_sep_by_end_times<P>(
self,
sep: P,
count: usize,
) -> FlatSepByEndTimes<Self, P> ⓘ
fn flat_sep_by_end_times<P>( self, sep: P, count: usize, ) -> FlatSepByEndTimes<Self, P> ⓘ
Repeats the iterable parser with separaters like
ParserExt::sep_by_end_times, and
flattens into one iterable parser.Source§fn flat_until<P>(self, end: P) -> FlatUntil<Self, P> ⓘ
fn flat_until<P>(self, end: P) -> FlatUntil<Self, P> ⓘ
Repeats the iterable parser until
end like ParserExt::until, and flattens into one
iterable parser.Source§fn try_map<F, O, E>(self, f: F) -> TryMap<Self, F> ⓘ
fn try_map<F, O, E>(self, f: F) -> TryMap<Self, F> ⓘ
Converts an output value into another type.
Source§fn enumerate(self) -> Enumerate<Self> ⓘwhere
Self: Sized,
fn enumerate(self) -> Enumerate<Self> ⓘwhere
Self: Sized,
Returns current iteration count with elements. Read more
Source§fn fold<Q, F>(self, init: Q, f: F) -> Fold<Self, Q, F> ⓘ
fn fold<Q, F>(self, init: Q, f: F) -> Fold<Self, Q, F> ⓘ
Folds items into an accumulator by repeatedly applying a function.
Source§fn try_fold<Q, F, E>(self, init: Q, f: F) -> TryFold<Self, Q, F> ⓘ
fn try_fold<Q, F, E>(self, init: Q, f: F) -> TryFold<Self, Q, F> ⓘ
Tries to fold items into an accumulator by repeatedly applying a failable function.
Source§fn reduce<F>(self, f: F) -> Reduce<Self, F> ⓘ
fn reduce<F>(self, f: F) -> Reduce<Self, F> ⓘ
Reduces items into a item by repeatedly applying a function.
Source§fn try_reduce<F, E>(self, f: F) -> TryReduce<Self, F> ⓘ
fn try_reduce<F, E>(self, f: F) -> TryReduce<Self, F> ⓘ
Tries to reduce items into a item by repeatedly applying a failable function.
Source§fn scan<Q, F, T>(self, init: Q, f: F) -> Scan<Self, Q, F> ⓘ
fn scan<Q, F, T>(self, init: Q, f: F) -> Scan<Self, Q, F> ⓘ
Holds internal state, applies the function item by item and returns the output (if it is
Some).