[−][src]Enum glsl::syntax::SimpleStatement
Simple statement.
Variants
Declaration(Declaration)
Expression(ExprStatement)
Selection(SelectionStatement)
Switch(SwitchStatement)
CaseLabel(CaseLabel)
Iteration(IterationStatement)
Jump(JumpStatement)
Methods
impl SimpleStatement
[src]
pub fn new_expr<E>(expr: E) -> Self where
E: Into<Expr>,
[src]
E: Into<Expr>,
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]
If: Into<Expr>,
True: Into<Statement>,
False: Into<Statement>,
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]
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.
pub fn new_while<C, S>(cond: C, body: S) -> Self where
C: Into<Condition>,
S: Into<Statement>,
[src]
C: Into<Condition>,
S: Into<Statement>,
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]
S: Into<Statement>,
C: Into<Expr>,
Create a new do-while statement.
Trait Implementations
impl Parse for SimpleStatement
[src]
impl Host for SimpleStatement
[src]
impl Clone for SimpleStatement
[src]
fn clone(&self) -> SimpleStatement
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl PartialEq<SimpleStatement> for SimpleStatement
[src]
fn eq(&self, other: &SimpleStatement) -> bool
[src]
fn ne(&self, other: &SimpleStatement) -> bool
[src]
impl Debug for SimpleStatement
[src]
Auto Trait Implementations
impl Send for SimpleStatement
impl Sync for SimpleStatement
impl Unpin for SimpleStatement
impl RefUnwindSafe for SimpleStatement
impl UnwindSafe for SimpleStatement
Blanket Implementations
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,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,