[][src]Enum ergo_lib::ast::Expr

pub enum Expr {
    Const(Constant),
    ConstPlaceholder(ConstantPlaceholder),
    Coll {
        tpe: SType,
        v: Vec<Expr>,
    },
    Tup {
        tpe: SType,
        v: Vec<Expr>,
    },
    PredefFunc(PredefFunc),
    CollM(CollMethods),
    BoxM(BoxMethods),
    CtxM(ContextMethods),
    MethodCall {
        tpe: SType,
        obj: Box<Expr>,
        method: SMethod,
        args: Vec<Expr>,
    },
    BinOp(BinOpBox<Expr>, Box<Expr>),
}

Expression in ErgoTree

Variants

Const(Constant)

Constant value

ConstPlaceholder(ConstantPlaceholder)

Placeholder for a constant

Coll

Collection of values (same type)

Fields of Coll

tpe: SType

Collection type

v: Vec<Expr>

Values of the collection

Tup

Tuple

Fields of Tup

tpe: SType

Tuple type

v: Vec<Expr>

Values of the tuple

PredefFunc(PredefFunc)

Predefined functions (global)

Collection type methods

Box methods

Context methods (i.e CONTEXT.INPUTS)

MethodCall

Method call

Fields of MethodCall

tpe: SType

Method call type

obj: Box<Expr>

Method call object

method: SMethod

Method signature

args: Vec<Expr>

Arguments of the method call

BinOp(BinOpBox<Expr>, Box<Expr>)

Binary operation

Implementations

impl Expr[src]

pub fn op_code(&self) -> OpCode[src]

Code (used in serialization)

pub fn tpe(&self) -> &SType[src]

Type of the expression

Trait Implementations

impl Clone for Expr[src]

impl Debug for Expr[src]

impl Display for Expr[src]

impl Eq for Expr[src]

impl PartialEq<Expr> for Expr[src]

impl SigmaSerializable for Expr[src]

impl StructuralEq for Expr[src]

impl StructuralPartialEq for Expr[src]

Auto Trait Implementations

impl !RefUnwindSafe for Expr

impl !Send for Expr

impl !Sync for Expr

impl Unpin for Expr

impl !UnwindSafe for Expr

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<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

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

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

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