Struct pest::prec_climber::Operator
source · [−]pub struct Operator<R: RuleType> { /* private fields */ }
👎 Deprecated since 2.4.0:
Use pest::pratt_parser
instead (it is an equivalent which also supports unary prefix/suffix operators).
While prec_climber is going to be kept in 2.x minor and patch releases, it may be removed in a future major release.
Expand description
Infix operator used in PrecClimber
.
Implementations
sourceimpl<R: RuleType> Operator<R>
impl<R: RuleType> Operator<R>
sourcepub fn new(rule: R, assoc: Assoc) -> Operator<R>
👎 Deprecated since 2.4.0: Use pest::pratt_parser
instead (it is an equivalent which also supports unary prefix/suffix operators).
While prec_climber is going to be kept in 2.x minor and patch releases, it may be removed in a future major release.
pub fn new(rule: R, assoc: Assoc) -> Operator<R>
Use pest::pratt_parser
instead (it is an equivalent which also supports unary prefix/suffix operators).
While prec_climber is going to be kept in 2.x minor and patch releases, it may be removed in a future major release.
Creates a new Operator
from a Rule
and Assoc
.
Examples
Operator::new(Rule::plus, Assoc::Left) | Operator::new(Rule::minus, Assoc::Right);
Trait Implementations
Auto Trait Implementations
impl<R> RefUnwindSafe for Operator<R> where
R: RefUnwindSafe,
impl<R> Send for Operator<R> where
R: Send,
impl<R> Sync for Operator<R> where
R: Sync,
impl<R> Unpin for Operator<R> where
R: Unpin,
impl<R> UnwindSafe for Operator<R> where
R: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more