pub enum Associativity {
    Left,
    Right,
    None,
}Expand description
Operator associativity defines how operators of the same precedence are grouped.
Associativity determines whether an expression like a + b + c is interpreted as
(a + b) + c (left-associative) or a + (b + c) (right-associative).
Non-associative operators cannot be chained together without explicit parentheses.
Variants§
Left
Left-associative operators group from left to right.
For example, subtraction is left-associative: a - b - c means (a - b) - c
Right
Right-associative operators group from right to left.
For example, assignment is right-associative: a = b = c means a = (b = c)
None
Non-associative operators cannot be chained without parentheses. For example, comparison operators are typically non-associative
Trait Implementations§
Source§impl Clone for Associativity
 
impl Clone for Associativity
Source§fn clone(&self) -> Associativity
 
fn clone(&self) -> Associativity
Returns a duplicate 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 PartialEq for Associativity
 
impl PartialEq for Associativity
impl Copy for Associativity
impl Eq for Associativity
impl StructuralPartialEq for Associativity
Auto Trait Implementations§
impl Freeze for Associativity
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