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§
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)>
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>
fn chain_left1<'a, I, A, BOP>( p: Self::P<'a, I, A>, op: Self::P<'a, I, BOP>, ) -> Self::P<'a, I, 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>
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>
Provided Methods§
fn opt<'a, I, A>(parser: Self::P<'a, I, A>) -> Self::P<'a, I, Option<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>
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>
fn chain_right1<'a, I, A, BOP>( p: Self::P<'a, I, A>, op: Self::P<'a, I, BOP>, ) -> Self::P<'a, I, 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.