[][src]Enum full_moon::ast::Expression

pub enum Expression<'a> {
    Parentheses {
        contained: ContainedSpan<'a>,
        expression: Box<Expression<'a>>,
    },
    UnaryOperator {
        unop: UnOp<'a>,
        expression: Box<Expression<'a>>,
    },
    Value {
        value: Box<Value<'a>>,
        binop: Option<BinOpRhs<'a>>,
    },
}

An expression, mostly useful for getting values

Variants

Parentheses

A statement in parentheses, such as (#list)

Fields of Parentheses

contained: ContainedSpan<'a>

The parentheses of the ParenExpression

expression: Box<Expression<'a>>

The expression inside the parentheses

UnaryOperator

A unary operation, such as #list

Fields of UnaryOperator

unop: UnOp<'a>

The unary operation, the # part of #list

expression: Box<Expression<'a>>

The expression the operation is being done on, the list part of #list

Value

A value, such as "strings"

Fields of Value

value: Box<Value<'a>>

The value itself

binop: Option<BinOpRhs<'a>>

The binary operation being done, if one exists (the + 3 part of 2 + 3)

Trait Implementations

impl<'a> Clone for Expression<'a>[src]

impl<'a> Debug for Expression<'a>[src]

impl<'de: 'a, 'a> Deserialize<'de> for Expression<'a>[src]

impl<'a> Display for Expression<'a>[src]

impl<'a> Node<'a> for Expression<'a>[src]

impl<'a> Owned for Expression<'a>[src]

type Owned = Expression<'static>

What an owned version of the object looks like. Usually contains a 'static lifetime.

impl<'a> PartialEq<Expression<'a>> for Expression<'a>[src]

impl<'a> Serialize for Expression<'a>[src]

impl<'a> StructuralPartialEq for Expression<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for Expression<'a>

impl<'a> Send for Expression<'a>

impl<'a> Sync for Expression<'a>

impl<'a> Unpin for Expression<'a>

impl<'a> UnwindSafe for Expression<'a>

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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[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.