[−][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 statement, does nothing.
Block(Block)
A block containing more statements, to be executed sequentially.
Conditionally executes one of two blocks, based on the value of the condition.
Fields of If
Conditionally executes one of multiple blocks, based on the value of the selector.
Fields of Switch
Executes a block repeatedly.
Exits the loop.
Skips execution to the next iteration of the loop.
Returns from the function (possibly with a value).
Fields of Return
value: Option<Handle<Expression>>
Aborts the current shader execution.
Stores a value at an address.
Fields of Store
pointer: Handle<Expression>
value: Handle<Expression>
Trait Implementations
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][+]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> From<T> for T
[src][+]
impl<T, U> Into<U> for T where
U: From<T>,
[src][+]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src][+]
T: Clone,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,