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) -> Self
pub fn new_if_else<If, True, False>(ife: If, truee: True, falsee: False) -> Self
Create a new selection statement (if / else).
sourcepub fn new_switch<H, B>(head: H, body: B) -> Self
pub fn new_switch<H, B>(head: H, body: B) -> Self
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 moresource§impl Debug for SimpleStatement
impl Debug for SimpleStatement
source§impl Host for SimpleStatement
impl Host for SimpleStatement
source§impl HostMut for SimpleStatement
impl HostMut for SimpleStatement
source§fn visit_mut<V>(&mut self, visitor: &mut V)where
V: VisitorMut,
fn visit_mut<V>(&mut self, visitor: &mut V)where
V: VisitorMut,
Visit an AST node.
source§impl Parse for SimpleStatement
impl Parse for SimpleStatement
source§impl PartialEq for SimpleStatement
impl PartialEq for SimpleStatement
source§fn eq(&self, other: &SimpleStatement) -> bool
fn eq(&self, other: &SimpleStatement) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for SimpleStatement
Auto Trait Implementations§
impl RefUnwindSafe for SimpleStatement
impl Send for SimpleStatement
impl Sync for SimpleStatement
impl Unpin for SimpleStatement
impl UnwindSafe for SimpleStatement
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more