Skip to main content

ParserExt

Trait ParserExt 

Source
trait ParserExt<I, O, E>: Parser<I, O, E> + Sized
where I: Clone, E: ParseError<I>,
{ // Provided methods fn followed_by<F, O2>(self, suffix: F) -> impl Parser<I, O, E> where F: Parser<I, O2, E> { ... } fn precedes<F, O2>(self, next: F) -> impl Parser<I, O2, E> where F: Parser<I, O2, E> { ... } fn opt(self) -> impl Parser<I, Option<O>, E> { ... } fn cut(self) -> impl Parser<I, O, E> { ... } }
Expand description

Extra methods on parsers.

Provided Methods§

Source

fn followed_by<F, O2>(self, suffix: F) -> impl Parser<I, O, E>
where F: Parser<I, O2, E>,

Source

fn precedes<F, O2>(self, next: F) -> impl Parser<I, O2, E>
where F: Parser<I, O2, E>,

Source

fn opt(self) -> impl Parser<I, Option<O>, E>

Source

fn cut(self) -> impl Parser<I, O, E>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<I, O, E, P> ParserExt<I, O, E> for P
where I: Clone, E: ParseError<I>, P: Parser<I, O, E>,