Enum chumsky::pratt::Associativity
source · pub enum Associativity {
Left(u16),
Right(u16),
}
Available on crate feature
pratt
only.Expand description
Defines the associativity and binding power of an infix
operator (see left
and right
).
Higher binding powers should be used for higher precedence operators.
Variants§
Left(u16)
Specifies that the operator should be left-associative, with the given binding power (see left
).
Right(u16)
Specifies that the operator should be right-associative, with the given binding power (see right
).
Trait Implementations§
source§impl Clone for Associativity
impl Clone for Associativity
source§fn clone(&self) -> Associativity
fn clone(&self) -> Associativity
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for Associativity
impl Debug for Associativity
source§impl Ord for Associativity
impl Ord for Associativity
source§fn cmp(&self, other: &Associativity) -> Ordering
fn cmp(&self, other: &Associativity) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for Associativity
impl PartialEq for Associativity
source§fn eq(&self, other: &Associativity) -> bool
fn eq(&self, other: &Associativity) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for Associativity
impl PartialOrd for Associativity
source§fn partial_cmp(&self, other: &Associativity) -> Option<Ordering>
fn partial_cmp(&self, other: &Associativity) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for Associativity
impl Eq for Associativity
impl StructuralEq for Associativity
impl StructuralPartialEq for Associativity
Auto Trait Implementations§
impl RefUnwindSafe for Associativity
impl Send for Associativity
impl Sync for Associativity
impl Unpin for Associativity
impl UnwindSafe for Associativity
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