[][src]Enum dyon::ast::BinOp

pub enum BinOp {
    Add,
    Sub,
    Mul,
    Dot,
    Cross,
    Div,
    Rem,
    Pow,
    OrElse,
    AndAlso,
    Less,
    LessOrEqual,
    Greater,
    GreaterOrEqual,
    Equal,
    NotEqual,
}

Binary operator.

Variants

Add

Addition operator (+).

Sub

Subtraction operator (-).

Mul

Multiply operator (*).

Dot

Dot product operator (*.).

Cross

Cross product operator (x).

Div

Division operator (/).

Rem

Remainder operator (%).

Pow

Power operator (^).

OrElse

Lazy OR operator (||).

AndAlso

Lazy AND operator (&&).

Less

Less.

LessOrEqual

Less or equal.

Greater

Greater.

GreaterOrEqual

Greater or equal.

Equal

Equal.

NotEqual

Not equal.

Implementations

impl BinOp[src]

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

Returns symbol of binary operator.

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

Returns symbol of binary operator in boolean variant.

pub fn precedence(self) -> u8[src]

Returns the operator precedence level. Used to put parentheses in right places when printing out closures.

Trait Implementations

impl Clone for BinOp[src]

impl Copy for BinOp[src]

impl Debug for BinOp[src]

Auto Trait Implementations

impl RefUnwindSafe for BinOp

impl Send for BinOp

impl Sync for BinOp

impl Unpin for BinOp

impl UnwindSafe for BinOp

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.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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