Trait ratatat::ParserExt[][src]

pub trait ParserExt<'a>: Parser<'a> {
    fn parse(
        &self,
        ctx: &Context<'a>,
        limit: usize,
        pos: &mut usize
    ) -> Option<Self::O> { ... }
fn run(
        &self,
        ctx: &Context<'a>,
        limit: usize,
        pos: &mut usize
    ) -> Option<Self::O> { ... }
fn map<T, F: Fn(Self::O) -> T>(self, f: F) -> Map<Self, F>
    where
        Self: Sized
, { ... }
fn filter<F: Fn(&Self::O) -> bool>(self, f: F) -> Filter<Self, F>
    where
        Self: Sized
, { ... }
fn filter_map<T, F: Fn(Self::O) -> Option<T>>(
        self,
        f: F
    ) -> FilterMap<Self, F>
    where
        Self: Sized
, { ... }
fn then<T: Parser<'a>, F: Fn(Self::O) -> T>(self, f: F) -> Then<Self, F>
    where
        Self: Sized
, { ... }
fn recognize(self) -> Recognize<Self>
    where
        Self: Sized
, { ... }
fn many<R: RangeBounds<usize>>(self, r: R) -> Many<Self>
    where
        Self: Sized
, { ... }
fn named<N: Borrow<str> + Debug>(self, name: N) -> Named<Self, N>
    where
        Self: Sized
, { ... }
fn opt(self) -> Opt<Self>
    where
        Self: Sized
, { ... } }

Provided methods

this is the parse method that should be called. it wraps impl_parse, and does logging/etc.

run is an alias for parse, to make it easier when the parser type has another ‘parse’ method

Implementors