pub enum AssignmentOperator {
Assign,
Add,
Subtract,
Multiply,
Divide,
Modulo,
Xor,
Or,
And,
}Expand description
An assignment operator.
The plain form evaluates the right-hand side and stores it in the left-hand operand, converting between types where it can, a number into a string property, for instance. Assigning one container to another requires the subproperty names on both sides to line up.
The compound forms apply their operation and then assign.
Variants§
Assign
Assignment, =.
Add
Add and assign, +=.
Subtract
Subtract and assign, -=.
Multiply
Multiply and assign, *=.
Divide
Divide and assign, /=.
Modulo
Take the remainder and assign, %=.
Xor
Exclusive-or and assign, ^=.
Or
Bitwise-or and assign, |=.
And
Bitwise-and and assign, &=.
Implementations§
Source§impl AssignmentOperator
impl AssignmentOperator
Sourcepub const fn precedence(self) -> Option<u8>
pub const fn precedence(self) -> Option<u8>
Binding strength, deliberately unmeasured.
Assignment binds loosest of everything here, but the exact level was not
established by evaluation, and a number that has not been verified would
be a guess presented as a fact. None says so honestly.
Trait Implementations§
Source§impl Clone for AssignmentOperator
impl Clone for AssignmentOperator
Source§fn clone(&self) -> AssignmentOperator
fn clone(&self) -> AssignmentOperator
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more