[][src]Enum boa::syntax::ast::op::NumOp

pub enum NumOp {
    Add,
    Sub,
    Div,
    Mul,
    Exp,
    Mod,
}

Arithmetic operators take numerical values (either literals or variables) as their operands and return a single numerical value.

More information:

Variants

Add

The addition operator produces the sum of numeric operands or string concatenation.

Syntax: x + y

More information:

Sub

The subtraction operator subtracts the two operands, producing their difference.

Syntax: x - y

More information:

Div

The division operator produces the quotient of its operands where the left operand is the dividend and the right operand is the divisor.

Syntax: x / y

More information:

Mul

The multiplication operator produces the product of the operands.

Syntax: x * y

More information:

Exp

The exponentiation operator returns the result of raising the first operand to the power of the second operand.

Syntax: x ** y

The exponentiation operator is right-associative. a ** b ** c is equal to a ** (b ** c).

More information:

Mod

The remainder operator returns the remainder left over when one operand is divided by a second operand.

Syntax: x % y

The remainder operator always takes the sign of the dividend.

More information:

Trait Implementations

impl Clone for NumOp[src]

impl Copy for NumOp[src]

impl Debug for NumOp[src]

impl Display for NumOp[src]

impl Finalize for NumOp[src]

impl From<NumOp> for BinOp[src]

impl PartialEq<NumOp> for NumOp[src]

impl StructuralPartialEq for NumOp[src]

impl Trace for NumOp[src]

Auto Trait Implementations

impl RefUnwindSafe for NumOp

impl Send for NumOp

impl Sync for NumOp

impl Unpin for NumOp

impl UnwindSafe for NumOp

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,