[][src]Enum naga::Statement

[]
pub enum Statement {
    Empty,
    Block(Block),
    If {
        condition: Handle<Expression>,
        accept: Block,
        reject: Block,
    },
    Switch {
        selector: Handle<Expression>,
        cases: FastHashMap<i32, (Block, Option<FallThrough>)>,
        default: Block,
    },
    Loop {
        body: Block,
        continuing: Block,
    },
    Break,
    Continue,
    Return {
        value: Option<Handle<Expression>>,
    },
    Kill,
    Store {
        pointer: Handle<Expression>,
        value: Handle<Expression>,
    },
}
[]

Instructions which make up an executable block.

Variants

Empty
[]

Empty statement, does nothing.

Block(Block)
[]

A block containing more statements, to be executed sequentially.

If
[]

Conditionally executes one of two blocks, based on the value of the condition.

[]

Fields of If

condition: Handle<Expression>accept: Blockreject: Block
Switch
[]

Conditionally executes one of multiple blocks, based on the value of the selector.

[]

Fields of Switch

selector: Handle<Expression>cases: FastHashMap<i32, (Block, Option<FallThrough>)>default: Block
Loop
[]

Executes a block repeatedly.

[]

Fields of Loop

body: Blockcontinuing: Block
Break
[]

Exits the loop.

Continue
[]

Skips execution to the next iteration of the loop.

Return
[]

Returns from the function (possibly with a value).

[]

Fields of Return

value: Option<Handle<Expression>>
Kill
[]

Aborts the current shader execution.

Store
[]

Stores a value at an address.

[]

Fields of Store

pointer: Handle<Expression>value: Handle<Expression>

Trait Implementations

impl Clone for Statement[src][+]

impl Debug for Statement[src][+]

Auto Trait Implementations

impl RefUnwindSafe for Statement

impl Send for Statement

impl Sync for Statement

impl Unpin for Statement

impl UnwindSafe for Statement

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.