[][src]Struct libslide::BinaryExpr

pub struct BinaryExpr<E: RcExpression> {
    pub op: BinaryOperator,
    pub lhs: E,
    pub rhs: E,
}

A binary expression.

Fields

op: BinaryOperator

The binary operator.

lhs: E

The left hand side of the binary operator.

rhs: E

The right hand side of the binary operator.

Implementations

impl<E> BinaryExpr<E> where
    E: RcExpression
[src]

pub fn sub<T, U>(lhs: T, rhs: U) -> Self where
    T: Into<E>,
    U: Into<E>, 
[src]

Creates a binary expression with the given operator.

pub fn mult<T, U>(lhs: T, rhs: U) -> Self where
    T: Into<E>,
    U: Into<E>, 
[src]

Creates a binary expression with the given operator.

pub fn div<T, U>(lhs: T, rhs: U) -> Self where
    T: Into<E>,
    U: Into<E>, 
[src]

Creates a binary expression with the given operator.

pub fn exp<T, U>(lhs: T, rhs: U) -> Self where
    T: Into<E>,
    U: Into<E>, 
[src]

Creates a binary expression with the given operator.

Trait Implementations

impl<E: Clone + RcExpression> Clone for BinaryExpr<E>[src]

impl<E: Debug + RcExpression> Debug for BinaryExpr<E>[src]

impl Display for BinaryExpr<RcExpr>[src]

impl Display for BinaryExpr<RcExprPat>[src]

impl Emit for BinaryExpr<RcExpr>[src]

impl Emit for BinaryExpr<RcExprPat>[src]

impl<E: Eq + RcExpression> Eq for BinaryExpr<E>[src]

impl<E: Hash + RcExpression> Hash for BinaryExpr<E>[src]

impl<E> Ord for BinaryExpr<E> where
    E: RcExpression
[src]

impl<E: PartialEq + RcExpression> PartialEq<BinaryExpr<E>> for BinaryExpr<E>[src]

impl<E> PartialOrd<BinaryExpr<E>> for BinaryExpr<E> where
    E: RcExpression
[src]

impl<E: RcExpression> StructuralEq for BinaryExpr<E>[src]

impl<E: RcExpression> StructuralPartialEq for BinaryExpr<E>[src]

Auto Trait Implementations

impl<E> RefUnwindSafe for BinaryExpr<E> where
    E: RefUnwindSafe

impl<E> Send for BinaryExpr<E> where
    E: Send

impl<E> Sync for BinaryExpr<E> where
    E: Sync

impl<E> Unpin for BinaryExpr<E> where
    E: Unpin

impl<E> UnwindSafe for BinaryExpr<E> where
    E: UnwindSafe

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.