pub enum Associativity {
Left,
Right,
}Expand description
The associativity of a binary or unary operation.
Variants§
Left
The binary / unary operation is left-associative.
For binary operations, this means a op b op c is evaluated as (a op b) op c. For unary
operations, this means a op op is evaluated as (a op) op (the operators appear to the
right of the operand).
Right
The binary / unary operation is right-associative.
For binary operations, this means a op b op c is evaluated as a op (b op c). For unary
operations, this means op op a is evaluated as op (op a) (the operators appear to the
left of the operand).
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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for Associativity
Source§impl Debug for Associativity
impl Debug for Associativity
impl Eq for Associativity
Source§impl PartialEq for Associativity
impl PartialEq for Associativity
Source§fn eq(&self, other: &Associativity) -> bool
fn eq(&self, other: &Associativity) -> bool
Tests for
self and other values to be equal, and is used by ==.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 UnsafeUnpin 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