[][src]Enum bmx::Expr

pub enum Expr<T> {
    Not(Box<Expr<T>>),
    And(Vec<Expr<T>>),
    Or(Vec<Expr<T>>),
    Eq(Box<[Expr<T>; 2]>),
    Add(Box<[Expr<T>; 2]>),
    Sub(Box<[Expr<T>; 2]>),
    Mul(Box<[Expr<T>; 2]>),
    BitNot(Box<Expr<T>>),
    BitAnd(Box<[Expr<T>; 2]>),
    BitOr(Box<[Expr<T>; 2]>),
    BitShl(Box<[Expr<T>; 2]>),
    BitShr(Box<[Expr<T>; 2]>),
    TypeProperty(T, String),
    Ref(T),
    Const(Value),
}

An expression, parameterized over the domain of references.

A reference can be:

  • An identifier, on the syntactic level,
  • an R, for the expanded representation,
  • a field index (usize) when executing.

Variants

Not(Box<Expr<T>>)
And(Vec<Expr<T>>)
Or(Vec<Expr<T>>)
Eq(Box<[Expr<T>; 2]>)
Add(Box<[Expr<T>; 2]>)
Sub(Box<[Expr<T>; 2]>)
Mul(Box<[Expr<T>; 2]>)
BitNot(Box<Expr<T>>)
BitAnd(Box<[Expr<T>; 2]>)
BitOr(Box<[Expr<T>; 2]>)
BitShl(Box<[Expr<T>; 2]>)
BitShr(Box<[Expr<T>; 2]>)
TypeProperty(T, String)
Ref(T)
Const(Value)

Implementations

impl<T> Expr<T>[src]

pub fn constant(value: impl Into<Value>) -> Self[src]

pub fn equal(e1: impl Into<Expr<T>>, e2: impl Into<Expr<T>>) -> Self[src]

pub fn add(e1: impl Into<Expr<T>>, e2: impl Into<Expr<T>>) -> Self[src]

pub fn sub(e1: impl Into<Expr<T>>, e2: impl Into<Expr<T>>) -> Self[src]

pub fn mul(e1: impl Into<Expr<T>>, e2: impl Into<Expr<T>>) -> Self[src]

pub fn bitwise_not(e: impl Into<Expr<T>>) -> Self[src]

pub fn bitwise_and(e1: impl Into<Expr<T>>, e2: impl Into<Expr<T>>) -> Self[src]

pub fn bitwise_or(e1: impl Into<Expr<T>>, e2: impl Into<Expr<T>>) -> Self[src]

pub fn bitwise_shift_left(
    e1: impl Into<Expr<T>>,
    e2: impl Into<Expr<T>>
) -> Self
[src]

pub fn bitwise_shift_right(
    e1: impl Into<Expr<T>>,
    e2: impl Into<Expr<T>>
) -> Self
[src]

pub fn simplified(self) -> Self[src]

Trait Implementations

impl<T: Clone> Clone for Expr<T>[src]

impl<T: Debug> Debug for Expr<T>[src]

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

Auto Trait Implementations

impl<T> RefUnwindSafe for Expr<T> where
    T: RefUnwindSafe

impl<T> Send for Expr<T> where
    T: Send

impl<T> Sync for Expr<T> where
    T: Sync

impl<T> Unpin for Expr<T> where
    T: Unpin

impl<T> UnwindSafe for Expr<T> where
    T: 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<!> for T[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.