oni_comb_parser_rs::prelude

Trait OperatorParser

Source
pub trait OperatorParser<'a>: ParserRunner<'a> {
Show 13 methods // Required methods fn and_then<B>( self, other: Self::P<'a, Self::Input, B>, ) -> Self::P<'a, Self::Input, (Self::Output, B)> where Self::Output: Clone + Debug + 'a, B: Clone + Debug + 'a; fn or( self, other: Self::P<'a, Self::Input, Self::Output>, ) -> Self::P<'a, Self::Input, Self::Output> where Self::Output: Debug + 'a; fn exists(self) -> Self::P<'a, Self::Input, bool> where Self::Output: Debug + 'a; fn not(self) -> Self::P<'a, Self::Input, ()> where Self::Output: Debug + 'a; fn opt(self) -> Self::P<'a, Self::Input, Option<Self::Output>> where Self::Output: Clone + Debug + 'a; fn attempt(self) -> Self::P<'a, Self::Input, Self::Output> where Self::Output: Debug + 'a; fn scan_right1<BOP>( self, op: Self::P<'a, Self::Input, BOP>, ) -> Self::P<'a, Self::Input, Self::Output> where BOP: Fn(Self::Output, Self::Output) -> Self::Output + 'a, Self::Output: Clone + Debug + 'a; fn chain_right0<BOP>( self, op: Self::P<'a, Self::Input, BOP>, x: Self::Output, ) -> Self::P<'a, Self::Input, Self::Output> where BOP: Fn(Self::Output, Self::Output) -> Self::Output + 'a, Self::Output: Clone + Debug + 'a; fn chain_left0<BOP>( self, op: Self::P<'a, Self::Input, BOP>, x: Self::Output, ) -> Self::P<'a, Self::Input, Self::Output> where BOP: Fn(Self::Output, Self::Output) -> Self::Output + 'a, Self::Output: Clone + Debug + 'a; fn chain_right1<BOP>( self, op: Self::P<'a, Self::Input, BOP>, ) -> Self::P<'a, Self::Input, Self::Output> where BOP: Fn(Self::Output, Self::Output) -> Self::Output + 'a, Self::Output: Clone + Debug + 'a; fn chain_left1<BOP>( self, op: Self::P<'a, Self::Input, BOP>, ) -> Self::P<'a, Self::Input, Self::Output> where BOP: Fn(Self::Output, Self::Output) -> Self::Output + 'a, Self::Output: Clone + Debug + 'a; fn rest_right1<BOP>( self, op: Self::P<'a, Self::Input, BOP>, x: Self::Output, ) -> Self::P<'a, Self::Input, Self::Output> where BOP: Fn(Self::Output, Self::Output) -> Self::Output + 'a, Self::Output: Clone + Debug + 'a; fn rest_left1<BOP>( self, op: Self::P<'a, Self::Input, BOP>, x: Self::Output, ) -> Self::P<'a, Self::Input, Self::Output> where BOP: Fn(Self::Output, Self::Output) -> Self::Output + 'a, Self::Output: Clone + Debug + 'a;
}

Required Methods§

Source

fn and_then<B>( self, other: Self::P<'a, Self::Input, B>, ) -> Self::P<'a, Self::Input, (Self::Output, B)>
where Self::Output: Clone + Debug + 'a, B: Clone + Debug + 'a,

Source

fn or( self, other: Self::P<'a, Self::Input, Self::Output>, ) -> Self::P<'a, Self::Input, Self::Output>
where Self::Output: Debug + 'a,

Source

fn exists(self) -> Self::P<'a, Self::Input, bool>
where Self::Output: Debug + 'a,

Source

fn not(self) -> Self::P<'a, Self::Input, ()>
where Self::Output: Debug + 'a,

Source

fn opt(self) -> Self::P<'a, Self::Input, Option<Self::Output>>
where Self::Output: Clone + Debug + 'a,

Source

fn attempt(self) -> Self::P<'a, Self::Input, Self::Output>
where Self::Output: Debug + 'a,

Source

fn scan_right1<BOP>( self, op: Self::P<'a, Self::Input, BOP>, ) -> Self::P<'a, Self::Input, Self::Output>
where BOP: Fn(Self::Output, Self::Output) -> Self::Output + 'a, Self::Output: Clone + Debug + 'a,

Source

fn chain_right0<BOP>( self, op: Self::P<'a, Self::Input, BOP>, x: Self::Output, ) -> Self::P<'a, Self::Input, Self::Output>
where BOP: Fn(Self::Output, Self::Output) -> Self::Output + 'a, Self::Output: Clone + Debug + 'a,

Source

fn chain_left0<BOP>( self, op: Self::P<'a, Self::Input, BOP>, x: Self::Output, ) -> Self::P<'a, Self::Input, Self::Output>
where BOP: Fn(Self::Output, Self::Output) -> Self::Output + 'a, Self::Output: Clone + Debug + 'a,

Source

fn chain_right1<BOP>( self, op: Self::P<'a, Self::Input, BOP>, ) -> Self::P<'a, Self::Input, Self::Output>
where BOP: Fn(Self::Output, Self::Output) -> Self::Output + 'a, Self::Output: Clone + Debug + 'a,

Source

fn chain_left1<BOP>( self, op: Self::P<'a, Self::Input, BOP>, ) -> Self::P<'a, Self::Input, Self::Output>
where BOP: Fn(Self::Output, Self::Output) -> Self::Output + 'a, Self::Output: Clone + Debug + 'a,

Source

fn rest_right1<BOP>( self, op: Self::P<'a, Self::Input, BOP>, x: Self::Output, ) -> Self::P<'a, Self::Input, Self::Output>
where BOP: Fn(Self::Output, Self::Output) -> Self::Output + 'a, Self::Output: Clone + Debug + 'a,

Source

fn rest_left1<BOP>( self, op: Self::P<'a, Self::Input, BOP>, x: Self::Output, ) -> Self::P<'a, Self::Input, Self::Output>
where BOP: Fn(Self::Output, Self::Output) -> Self::Output + 'a, Self::Output: 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§

Source§

impl<'a, I, A> OperatorParser<'a> for Parser<'a, I, A>