[−][src]Enum rustc_hir::BinOpKind

pub enum BinOpKind {
    Add,
    Sub,
    Mul,
    Div,
    Rem,
    And,
    Or,
    BitXor,
    BitAnd,
    BitOr,
    Shl,
    Shr,
    Eq,
    Lt,
    Le,
    Ne,
    Ge,
    Gt,
}

Variants

Add

The + operator (addition).

Sub

The - operator (subtraction).

Mul

The * operator (multiplication).

Div

The / operator (division).

Rem

The % operator (modulus).

And

The && operator (logical and).

Or

The || operator (logical or).

BitXor

The ^ operator (bitwise xor).

BitAnd

The & operator (bitwise and).

BitOr

The | operator (bitwise or).

Shl

The << operator (shift left).

Shr

The >> operator (shift right).

Eq

The == operator (equality).

Lt

The < operator (less than).

Le

The <= operator (less than or equal to).

Ne

The != operator (not equal to).

Ge

The >= operator (greater than or equal to).

Gt

The > operator (greater than).

Implementations

impl BinOpKind[src]

pub fn as_str(self) -> &'static str[src]

pub fn is_lazy(self) -> bool[src]

pub fn is_shift(self) -> bool[src]

pub fn is_comparison(self) -> bool[src]

pub fn is_by_value(self) -> bool[src]

Returns true if the binary operator takes its arguments by value.

Trait Implementations

impl Clone for BinOpKind[src]

impl Copy for BinOpKind[src]

impl Debug for BinOpKind[src]

impl<__E: Encoder> Encodable<__E> for BinOpKind[src]

impl<__CTX> HashStable<__CTX> for BinOpKind where
    __CTX: HashStableContext, 
[src]

impl Into<BinOpKind> for BinOpKind[src]

impl PartialEq<BinOpKind> for BinOpKind[src]

impl StructuralPartialEq for BinOpKind[src]

Auto Trait Implementations

impl RefUnwindSafe for BinOpKind

impl Send for BinOpKind

impl Sync for BinOpKind

impl Unpin for BinOpKind

impl UnwindSafe for BinOpKind

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, 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.