oni_comb_parser_rs::prelude

Trait OperatorParsers

Source
pub trait OperatorParsers: Parsers {
Show 13 methods // Required methods fn exists<'a, I, A>(parser: Self::P<'a, I, A>) -> Self::P<'a, I, bool> where A: Debug + 'a; fn not<'a, I, A>(parser: Self::P<'a, I, A>) -> Self::P<'a, I, ()> where A: Debug + 'a; fn or<'a, I, A>( parser1: Self::P<'a, I, A>, parser2: Self::P<'a, I, A>, ) -> Self::P<'a, I, A> where A: Debug + 'a; fn and_then<'a, I, A, B>( parser1: Self::P<'a, I, A>, parser2: Self::P<'a, I, B>, ) -> Self::P<'a, I, (A, B)> where A: Clone + Debug + 'a, B: Clone + Debug + 'a; fn attempt<'a, I, A>(parser: Self::P<'a, I, A>) -> Self::P<'a, I, A> where A: Debug + 'a; fn scan_right1<'a, I, A, BOP>( p: Self::P<'a, I, A>, op: Self::P<'a, I, BOP>, ) -> Self::P<'a, I, A> where BOP: Fn(A, A) -> A + 'a, A: Clone + Debug + 'a; fn chain_left1<'a, I, A, BOP>( p: Self::P<'a, I, A>, op: Self::P<'a, I, BOP>, ) -> Self::P<'a, I, A> where BOP: Fn(A, A) -> A + 'a, A: Clone + Debug + 'a; fn rest_right1<'a, I, A, BOP>( p: Self::P<'a, I, A>, op: Self::P<'a, I, BOP>, x: A, ) -> Self::P<'a, I, A> where BOP: Fn(A, A) -> A + 'a, A: Clone + Debug + 'a; fn rest_left1<'a, I, A, BOP>( p: Self::P<'a, I, A>, op: Self::P<'a, I, BOP>, x: A, ) -> Self::P<'a, I, A> where BOP: Fn(A, A) -> A + 'a, A: Clone + Debug + 'a; // Provided methods fn opt<'a, I, A>(parser: Self::P<'a, I, A>) -> Self::P<'a, I, Option<A>> where A: Clone + Debug + 'a { ... } fn chain_right0<'a, I, A, BOP>( p: Self::P<'a, I, A>, op: Self::P<'a, I, BOP>, x: A, ) -> Self::P<'a, I, A> where BOP: Fn(A, A) -> A + 'a, A: Clone + Debug + 'a { ... } fn chain_left0<'a, I, A, BOP>( p: Self::P<'a, I, A>, op: Self::P<'a, I, BOP>, x: A, ) -> Self::P<'a, I, A> where BOP: Fn(A, A) -> A + 'a, A: Clone + Debug + 'a { ... } fn chain_right1<'a, I, A, BOP>( p: Self::P<'a, I, A>, op: Self::P<'a, I, BOP>, ) -> Self::P<'a, I, A> where BOP: Fn(A, A) -> A + 'a, A: Clone + Debug + 'a { ... }
}

Required Methods§

Source

fn exists<'a, I, A>(parser: Self::P<'a, I, A>) -> Self::P<'a, I, bool>
where A: Debug + 'a,

Source

fn not<'a, I, A>(parser: Self::P<'a, I, A>) -> Self::P<'a, I, ()>
where A: Debug + 'a,

Source

fn or<'a, I, A>( parser1: Self::P<'a, I, A>, parser2: Self::P<'a, I, A>, ) -> Self::P<'a, I, A>
where A: Debug + 'a,

Source

fn and_then<'a, I, A, B>( parser1: Self::P<'a, I, A>, parser2: Self::P<'a, I, B>, ) -> Self::P<'a, I, (A, B)>
where A: Clone + Debug + 'a, B: Clone + Debug + 'a,

Source

fn attempt<'a, I, A>(parser: Self::P<'a, I, A>) -> Self::P<'a, I, A>
where A: Debug + 'a,

Source

fn scan_right1<'a, I, A, BOP>( p: Self::P<'a, I, A>, op: Self::P<'a, I, BOP>, ) -> Self::P<'a, I, A>
where BOP: Fn(A, A) -> A + 'a, A: Clone + Debug + 'a,

Source

fn chain_left1<'a, I, A, BOP>( p: Self::P<'a, I, A>, op: Self::P<'a, I, BOP>, ) -> Self::P<'a, I, A>
where BOP: Fn(A, A) -> A + 'a, A: Clone + Debug + 'a,

Source

fn rest_right1<'a, I, A, BOP>( p: Self::P<'a, I, A>, op: Self::P<'a, I, BOP>, x: A, ) -> Self::P<'a, I, A>
where BOP: Fn(A, A) -> A + 'a, A: Clone + Debug + 'a,

Source

fn rest_left1<'a, I, A, BOP>( p: Self::P<'a, I, A>, op: Self::P<'a, I, BOP>, x: A, ) -> Self::P<'a, I, A>
where BOP: Fn(A, A) -> A + 'a, A: Clone + Debug + 'a,

Provided Methods§

Source

fn opt<'a, I, A>(parser: Self::P<'a, I, A>) -> Self::P<'a, I, Option<A>>
where A: Clone + Debug + 'a,

Source

fn chain_right0<'a, I, A, BOP>( p: Self::P<'a, I, A>, op: Self::P<'a, I, BOP>, x: A, ) -> Self::P<'a, I, A>
where BOP: Fn(A, A) -> A + 'a, A: Clone + Debug + 'a,

Source

fn chain_left0<'a, I, A, BOP>( p: Self::P<'a, I, A>, op: Self::P<'a, I, BOP>, x: A, ) -> Self::P<'a, I, A>
where BOP: Fn(A, A) -> A + 'a, A: Clone + Debug + 'a,

Source

fn chain_right1<'a, I, A, BOP>( p: Self::P<'a, I, A>, op: Self::P<'a, I, BOP>, ) -> Self::P<'a, I, A>
where BOP: Fn(A, A) -> A + 'a, A: Clone + Debug + 'a,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§