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

pub enum BitOp {
    And,
    Or,
    Xor,
    Shl,
    Shr,
    UShr,
}

A bitwise operator is an operator used to perform bitwise operations on bit patterns or binary numerals that involve the manipulation of individual bits.

More information:

Variants

And

Performs the AND operation on each pair of bits. a AND b yields 1 only if both a and b are 1.

Syntax: x & y

More information:

Or

Performs the OR operation on each pair of bits. a OR b yields 1 if either a or b is 1.

Syntax: x | y

More information:

Xor

Performs the XOR operation on each pair of bits. a XOR b yields 1 if a and b are different.

Syntax: x ^ y

More information:

Shl

This operator shifts the first operand the specified number of bits to the left.

Syntax: x << y

Excess bits shifted off to the left are discarded. Zero bits are shifted in from the right.

More information:

Shr

This operator shifts the first operand the specified number of bits to the right.

Syntax: x >> y

Excess bits shifted off to the right are discarded. Copies of the leftmost bit are shifted in from the left. Since the new leftmost bit has the same value as the previous leftmost bit, the sign bit (the leftmost bit) does not change. Hence the name "sign-propagating".

More information:

UShr

This operator shifts the first operand the specified number of bits to the right.

Syntax: x >>> y

Excess bits shifted off to the right are discarded. Zero bits are shifted in from the left. The sign bit becomes 0, so the result is always non-negative. Unlike the other bitwise operators, zero-fill right shift returns an unsigned 32-bit integer.

More information:

Trait Implementations

impl Clone for BitOp[src]

impl Copy for BitOp[src]

impl Debug for BitOp[src]

impl Display for BitOp[src]

impl Finalize for BitOp[src]

impl From<BitOp> for BinOp[src]

impl PartialEq<BitOp> for BitOp[src]

impl StructuralPartialEq for BitOp[src]

impl Trace for BitOp[src]

Auto Trait Implementations

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> NativeObject for T where
    T: Any + Debug + Trace
[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>,