Enum glsl::syntax::SimpleStatement
source · pub enum SimpleStatement {
Declaration(Declaration),
Expression(ExprStatement),
Selection(SelectionStatement),
Switch(SwitchStatement),
CaseLabel(CaseLabel),
Iteration(IterationStatement),
Jump(JumpStatement),
}
Expand description
Simple statement.
Variants§
Declaration(Declaration)
Expression(ExprStatement)
Selection(SelectionStatement)
Switch(SwitchStatement)
CaseLabel(CaseLabel)
Iteration(IterationStatement)
Jump(JumpStatement)
Implementations§
source§impl SimpleStatement
impl SimpleStatement
sourcepub fn new_if_else<If, True, False>(ife: If, truee: True, falsee: False) -> Selfwhere
If: Into<Expr>,
True: Into<Statement>,
False: Into<Statement>,
pub fn new_if_else<If, True, False>(ife: If, truee: True, falsee: False) -> Selfwhere
If: Into<Expr>,
True: Into<Statement>,
False: Into<Statement>,
Create a new selection statement (if / else).
sourcepub fn new_switch<H, B>(head: H, body: B) -> Selfwhere
H: Into<Expr>,
B: IntoIterator<Item = Statement>,
pub fn new_switch<H, B>(head: H, body: B) -> Selfwhere
H: Into<Expr>,
B: IntoIterator<Item = Statement>,
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.
Trait Implementations§
source§impl Clone for SimpleStatement
impl Clone for SimpleStatement
source§fn clone(&self) -> SimpleStatement
fn clone(&self) -> SimpleStatement
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more