pub struct Last<P> { /* private fields */ }Expand description
A parser for method last.
Implementations§
Trait Implementations§
Source§impl<P, I> Parser<I> for Last<P>
impl<P, I> Parser<I> for Last<P>
Source§type State = LastState<I, P>
type State = LastState<I, P>
The internal state used in
poll_parse. Read moreSource§fn poll_parse(
&mut self,
input: Pin<&mut I>,
cx: &mut Context<'_>,
state: &mut Self::State,
) -> PolledResult<Self::Output, I>
fn poll_parse( &mut self, input: Pin<&mut I>, cx: &mut Context<'_>, state: &mut Self::State, ) -> PolledResult<Self::Output, I>
Parses the
input, give an Status.impl<P: Eq> Eq for Last<P>
impl<P> StructuralPartialEq for Last<P>
Auto Trait Implementations§
impl<P> Freeze for Last<P>where
P: Freeze,
impl<P> RefUnwindSafe for Last<P>where
P: RefUnwindSafe,
impl<P> Send for Last<P>where
P: Send,
impl<P> Sync for Last<P>where
P: Sync,
impl<P> Unpin for Last<P>where
P: Unpin,
impl<P> UnsafeUnpin for Last<P>where
P: UnsafeUnpin,
impl<P> UnwindSafe for Last<P>where
P: 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> ParserExt<I> for P
impl<P, I> ParserExt<I> for P
Source§fn parse<'a, 'b>(
&'a mut self,
input: &'b mut I,
) -> ParseFuture<'a, 'b, Self, I, Self::State>where
I: Unpin,
fn parse<'a, 'b>(
&'a mut self,
input: &'b mut I,
) -> ParseFuture<'a, 'b, Self, I, Self::State>where
I: Unpin,
An asynchronous version of
poll_parse, which returns a Future.Source§fn boxed<'a>(
self,
) -> Box<dyn Parser<I, Output = Self::Output, State = Self::State> + 'a>where
Self: Sized + 'a,
fn boxed<'a>(
self,
) -> Box<dyn Parser<I, Output = Self::Output, 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 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 with_position(self) -> WithPosition<Self> ⓘwhere
Self: Sized,
fn with_position(self) -> WithPosition<Self> ⓘwhere
Self: Sized,
Returns the position of parsed tokens with an output.
Source§fn prefix<P>(self, p: P) -> Prefix<Self, P> ⓘwhere
Self: Sized,
fn prefix<P>(self, p: P) -> Prefix<Self, P> ⓘwhere
Self: Sized,
Parses with
p prefixed by self.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 once(self) -> Times<Self> ⓘwhere
Self: Sized,
I: Positioned,
fn once(self) -> Times<Self> ⓘwhere
Self: Sized,
I: Positioned,
Returns a
IterableParser by wrapping the parser to return output exactly once. Read moreSource§fn times(self, n: usize) -> Times<Self> ⓘwhere
Self: Sized,
I: Positioned,
fn times(self, n: usize) -> Times<Self> ⓘwhere
Self: Sized,
I: Positioned,
Returns a
IterableParser by repeating the parser exactly n times.Source§fn sep_by_times<P, R>(self, sep: P, count: usize) -> SepByTimes<Self, P> ⓘ
fn sep_by_times<P, R>(self, sep: P, count: usize) -> SepByTimes<Self, P> ⓘ
Returns a fixed-size
IterableParser of the parser separated by sep.Source§fn sep_by_end_times<P, R>(self, sep: P, count: usize) -> SepByEndTimes<Self, P> ⓘ
fn sep_by_end_times<P, R>(self, sep: P, count: usize) -> SepByEndTimes<Self, P> ⓘ
Returns a fixed-size
IterableParser of the parser separated by sep (trailing
separater is allowed).Source§fn repeat<R>(self, range: R) -> Repeat<Self, R> ⓘ
fn repeat<R>(self, range: R) -> Repeat<Self, R> ⓘ
Returns a
IterableParser by repeating the parser while succeeding.Source§fn sep_by<P, R>(self, sep: P, range: R) -> SepBy<Self, P, R> ⓘ
fn sep_by<P, R>(self, sep: P, range: R) -> SepBy<Self, P, R> ⓘ
Returns a
IterableParser of the parser separated by sep.Source§fn sep_by_end<P, R>(self, sep: P, range: R) -> SepByEnd<Self, P, R> ⓘ
fn sep_by_end<P, R>(self, sep: P, range: R) -> SepByEnd<Self, P, R> ⓘ
Returns a
IterableParser of the parser separated by sep (trailing separater is
allowed).Source§fn then<F, Q>(self, f: F) -> Then<Self, F> ⓘ
fn then<F, Q>(self, f: F) -> Then<Self, F> ⓘ
Parses with
self, passes output to the function f and parses with a returned Parser or
IterableParser.Source§fn try_then<F, Q, E>(self, f: F) -> TryThen<Self, F> ⓘ
fn try_then<F, Q, E>(self, f: F) -> TryThen<Self, F> ⓘ
Parses with
self, passes output to the failable function f and parses with a returned
Parser or IterableParser.Source§fn until<P>(self, end: P) -> Until<Self, P> ⓘ
fn until<P>(self, end: P) -> Until<Self, P> ⓘ
Returns a
IterableParser by repeating the parser until the parser end succeeds.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 with a failable function.
Source§fn spanned(self) -> Spanned<Self> ⓘwhere
Self: Sized,
fn spanned(self) -> Spanned<Self> ⓘwhere
Self: Sized,
Overrides the error position by the span of the parse.
Source§fn exclusive<E: Into<Expects>>(self, expected: E) -> Exclusive<Self> ⓘ
fn exclusive<E: Into<Expects>>(self, expected: E) -> Exclusive<Self> ⓘ
Overrides parsing errors as “exclusive”.
Source§fn rewindable(self) -> Rewindable<Self> ⓘwhere
Self: Sized,
fn rewindable(self) -> Rewindable<Self> ⓘwhere
Self: Sized,
Modifies “exclusive” errors as rewindable.