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ยง
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