Enum macrohelper::ConstExpr []

pub enum ConstExpr {
    Call(Box<ConstExpr>, Vec<ConstExpr>),
    Binary(BinOp, Box<ConstExpr>, Box<ConstExpr>),
    Unary(UnOp, Box<ConstExpr>),
    Lit(Lit),
    Cast(Box<ConstExpr>, Box<Ty>),
    Path(Path),
    Index(Box<ConstExpr>, Box<ConstExpr>),
    Paren(Box<ConstExpr>),
    Other(Expr),
}

Variants

A function call

The first field resolves to the function itself, and the second field is the list of arguments

A binary operation (For example: a + b, a * b)

A unary operation (For example: !x, *x)

A literal (For example: 1, "foo")

A cast (foo as f64)

Variable reference, possibly containing :: and/or type parameters, e.g. foo::bar::.

An indexing operation (foo[2])

No-op: used solely so we can pretty-print faithfully

If compiling with full support for expression syntax, any expression is allowed

Trait Implementations

impl Debug for ConstExpr

Formats the value using the given formatter.

impl ToTokens for ConstExpr

impl PartialEq<ConstExpr> for ConstExpr

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Clone for ConstExpr

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Eq for ConstExpr