[][src]Enum glsl::syntax::SimpleStatement

pub enum SimpleStatement {
    Declaration(Declaration),
    Expression(ExprStatement),
    Selection(SelectionStatement),
    Switch(SwitchStatement),
    CaseLabel(CaseLabel),
    Iteration(IterationStatement),
    Jump(JumpStatement),
}

Simple statement.

Variants

Declaration(Declaration)
Expression(ExprStatement)
CaseLabel(CaseLabel)

Methods

impl SimpleStatement[src]

pub fn new_expr<E>(expr: E) -> Self where
    E: Into<Expr>, 
[src]

Create a new expression statement.

pub fn new_if_else<If, True, False>(ife: If, truee: True, falsee: False) -> Self where
    If: Into<Expr>,
    True: Into<Statement>,
    False: Into<Statement>, 
[src]

Create a new selection statement (if / else).

pub fn new_switch<H, B>(head: H, body: B) -> Self where
    H: Into<Expr>,
    B: IntoIterator<Item = Statement>, 
[src]

Create a new switch statement.

A switch statement is always composed of a SimpleStatement::Switch block, that contains it all, and has as body a compound list of case statements.

pub fn new_while<C, S>(cond: C, body: S) -> Self where
    C: Into<Condition>,
    S: Into<Statement>, 
[src]

Create a new while statement.

pub fn new_do_while<C, S>(body: S, cond: C) -> Self where
    S: Into<Statement>,
    C: Into<Expr>, 
[src]

Create a new do-while statement.

Trait Implementations

impl Parse for SimpleStatement[src]

impl Host for SimpleStatement[src]

impl Clone for SimpleStatement[src]

impl PartialEq<SimpleStatement> for SimpleStatement[src]

impl Debug for SimpleStatement[src]

impl StructuralPartialEq for SimpleStatement[src]

Auto Trait Implementations

Blanket Implementations

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

impl<T> From<T> for 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<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]