[−][src]Enum boa::syntax::ast::op::AssignOp
An assignment operator assigns a value to its left operand based on the value of its right operand.
The simple assignment operator is equal (=
), which assigns the value of its right operand to its
left operand. That is, x = y
assigns the value of y to x
.
There are also compound assignment operators that are shorthand for the operations
More information:
Variants
The addition assignment operator adds the value of the right operand to a variable and assigns the result to the variable.
Syntax: x += y
The types of the two operands determine the behavior of the addition assignment operator. Addition or concatenation is possible.
More information:
The subtraction assignment operator subtracts the value of the right operand from a variable and assigns the result to the variable.
Syntax: x -= y
More information:
The multiplication assignment operator multiplies a variable by the value of the right operand and assigns the result to the variable.
Syntax: x *= y
More information:
The division assignment operator divides a variable by the value of the right operand and assigns the result to the variable.
Syntax: x /= y
More information:
The remainder assignment operator divides a variable by the value of the right operand and assigns the remainder to the variable.
Syntax: x %= y
More information:
The exponentiation assignment operator raises the value of a variable to the power of the right operand.
Syntax: x ** y
More information:
The bitwise AND assignment operator uses the binary representation of both operands, does a bitwise AND operation on them and assigns the result to the variable.
Syntax: x &= y
More information:
The bitwise OR assignment operator uses the binary representation of both operands, does a bitwise OR operation on them and assigns the result to the variable.
Syntax: x |= y
More information:
The bitwise XOR assignment operator uses the binary representation of both operands, does a bitwise XOR operation on them and assigns the result to the variable.
Syntax: x ^= y
More information:
The left shift assignment operator moves the specified amount of bits to the left and assigns the result to the variable.
Syntax: x <<= y
More information:
The right shift assignment operator moves the specified amount of bits to the right and assigns the result to the variable.
Syntax: x >>= y
More information:
Trait Implementations
impl Clone for AssignOp
[src]
impl Copy for AssignOp
[src]
impl Debug for AssignOp
[src]
impl Display for AssignOp
[src]
impl Finalize for AssignOp
[src]
impl From<AssignOp> for BinOp
[src]
impl PartialEq<AssignOp> for AssignOp
[src]
impl StructuralPartialEq for AssignOp
[src]
impl Trace for AssignOp
[src]
Auto Trait Implementations
impl RefUnwindSafe for AssignOp
impl Send for AssignOp
impl Sync for AssignOp
impl Unpin for AssignOp
impl UnwindSafe for AssignOp
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,