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ยง
Sourceยงimpl<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>
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> Freeze for Operator<R>where
R: Freeze,
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ยง
Sourceยงimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Sourceยงfn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more