Struct winnow::combinator::ResumeAfter

source ·
pub struct ResumeAfter<P, R, I, O, E>
where P: Parser<I, O, E>, R: Parser<I, (), E>, I: Stream + Recover<E>, E: FromRecoverableError<I, E>,
{ /* private fields */ }
Available on crate features unstable-recover and std only.
Expand description

Implementation of Parser::resume_after

Trait Implementations§

source§

impl<P, R, I, O, E> Parser<I, Option<O>, E> for ResumeAfter<P, R, I, O, E>
where P: Parser<I, O, E>, R: Parser<I, (), E>, I: Stream + Recover<E>, E: FromRecoverableError<I, E>,

source§

fn parse_next(&mut self, i: &mut I) -> PResult<Option<O>, E>

Take tokens from the Stream, turning it into the output Read more
source§

fn parse_peek(&mut self, input: I) -> IResult<I, O, E>

Take tokens from the Stream, turning it into the output Read more
source§

fn by_ref(&mut self) -> ByRef<'_, Self>
where Self: Sized,

Treat &mut Self as a parser Read more
source§

fn value<O2>(self, val: O2) -> Value<Self, I, O, O2, E>
where Self: Sized, O2: Clone,

Produce the provided value Read more
source§

fn default_value<O2>(self) -> DefaultValue<Self, I, O, O2, E>
where Self: Sized, O2: Default,

Produce a type’s default value Read more
source§

fn void(self) -> Void<Self, I, O, E>
where Self: Sized,

Discards the output of the Parser Read more
source§

fn output_into<O2>(self) -> OutputInto<Self, I, O, O2, E>
where Self: Sized, O: Into<O2>,

Convert the parser’s output to another type using std::convert::From Read more
source§

fn recognize(self) -> Recognize<Self, I, O, E>
where Self: Sized, I: Stream,

Produce the consumed input as produced value. Read more
source§

fn with_recognized(self) -> WithRecognized<Self, I, O, E>
where Self: Sized, I: Stream,

Produce the consumed input with the output Read more
source§

fn map<G, O2>(self, map: G) -> Map<Self, G, I, O, O2, E>
where G: FnMut(O) -> O2, Self: Sized,

Maps a function over the output of a parser Read more
source§

fn try_map<G, O2, E2>(self, map: G) -> TryMap<Self, G, I, O, O2, E, E2>
where Self: Sized, G: FnMut(O) -> Result<O2, E2>, I: Stream, E: FromExternalError<I, E2>,

Applies a function returning a Result over the output of a parser. Read more
source§

fn flat_map<G, H, O2>(self, map: G) -> FlatMap<Self, G, H, I, O, O2, E>
where Self: Sized, G: FnMut(O) -> H, H: Parser<I, O2, E>,

Creates a parser from the output of this one Read more
source§

fn context<C>(self, context: C) -> Context<Self, I, O, E, C>
where Self: Sized, I: Stream, E: AddContext<I, C>, C: Clone + Debug,

If parsing fails, add context to the error Read more
source§

fn complete_err(self) -> CompleteErr<Self>
where Self: Sized,

source§

fn err_into<E2>(self) -> ErrInto<Self, I, O, E, E2>
where Self: Sized, E: Into<E2>,

Convert the parser’s error to another type using std::convert::From
source§

fn retry_after<R>(self, recover: R) -> RetryAfter<Self, R, I, O, E>
where Self: Sized, R: Parser<I, (), E>, I: Stream + Recover<E>, E: FromRecoverableError<I, E>,

Recover from an error by skipping everything recover consumes and trying again Read more
source§

fn resume_after<R>(self, recover: R) -> ResumeAfter<Self, R, I, O, E>
where Self: Sized, R: Parser<I, (), E>, I: Stream + Recover<E>, E: FromRecoverableError<I, E>,

Recover from an error by skipping this parse and everything recover consumes Read more

Auto Trait Implementations§

§

impl<P, R, I, O, E> Freeze for ResumeAfter<P, R, I, O, E>
where P: Freeze, R: Freeze,

§

impl<P, R, I, O, E> RefUnwindSafe for ResumeAfter<P, R, I, O, E>

§

impl<P, R, I, O, E> Send for ResumeAfter<P, R, I, O, E>
where P: Send, R: Send, I: Send, O: Send, E: Send,

§

impl<P, R, I, O, E> Sync for ResumeAfter<P, R, I, O, E>
where P: Sync, R: Sync, I: Sync, O: Sync, E: Sync,

§

impl<P, R, I, O, E> Unpin for ResumeAfter<P, R, I, O, E>
where P: Unpin, R: Unpin, I: Unpin, O: Unpin, E: Unpin,

§

impl<P, R, I, O, E> UnwindSafe for ResumeAfter<P, R, I, O, E>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<P, I, O, R, E> RecoverableParser<I, O, R, E> for P

source§

fn recoverable_parse(&mut self, input: I) -> (I, Option<O>, Vec<R>)

Available on crate features unstable-recover and std only.
Collect all errors when parsing the input Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.