[][src]Struct rune::ast::ExprIf

pub struct ExprIf {
    pub if_: If,
    pub condition: Condition,
    pub block: Box<ExprBlock>,
    pub expr_else_ifs: Vec<ExprElseIf>,
    pub expr_else: Option<ExprElse>,
}

An if expression.

Fields

if_: If

The if token.

condition: Condition

The condition to the if statement.

block: Box<ExprBlock>

The body of the if statement.

expr_else_ifs: Vec<ExprElseIf>

Else if branches.

expr_else: Option<ExprElse>

The else part of the if expression.

Implementations

impl ExprIf[src]

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

Access the span of the expression.

pub fn produces_nothing(&self) -> bool[src]

An if statement evaluates to empty if it does not have an else branch.

Trait Implementations

impl Clone for ExprIf[src]

impl Debug for ExprIf[src]

Auto Trait Implementations

impl RefUnwindSafe for ExprIf

impl Send for ExprIf

impl Sync for ExprIf

impl Unpin for ExprIf

impl UnwindSafe for ExprIf

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,