Struct rune::ast::ExprUnary[][src]

pub struct ExprUnary {
    pub attributes: Vec<Attribute>,
    pub op_token: Token,
    pub expr: Expr,
    pub op: UnOp,
}

A unary expression.

Examples

use rune::{testing, ast};

testing::roundtrip::<ast::ExprUnary>("!0");
testing::roundtrip::<ast::ExprUnary>("*foo");
testing::roundtrip::<ast::ExprUnary>("&foo");
testing::roundtrip::<ast::ExprUnary>("&Foo {
    a: 42,
}");

Fields

attributes: Vec<Attribute>

Attributes associated with expression.

op_token: Token

Token associated with operator.

expr: Expr

The expression of the operation.

op: UnOp

The operation to apply.

Implementations

impl ExprUnary[src]

pub fn op_span(&self) -> Span[src]

Get the span of the op.

Trait Implementations

impl Clone for ExprUnary[src]

impl Debug for ExprUnary[src]

impl Eq for ExprUnary[src]

impl Parse for ExprUnary[src]

impl PartialEq<ExprUnary> for ExprUnary[src]

impl Spanned for ExprUnary[src]

impl StructuralEq for ExprUnary[src]

impl StructuralPartialEq for ExprUnary[src]

impl ToTokens for ExprUnary[src]

Auto Trait Implementations

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