[−][src]Enum glsl::syntax::Expr
The most general form of an expression. As you can see if you read the variant list, in GLSL, an assignment is an expression. This is a bit silly but think of an assignment as a statement first then an expression which evaluates to what the statement “returns”.
An expression is either an assignment or a list (comma) of assignments.
Variants
Variable(Identifier)
A variable expression, using an identifier.
IntConst(i32)
Integral constant expression.
UIntConst(u32)
Unsigned integral constant expression.
BoolConst(bool)
Boolean constant expression.
FloatConst(f32)
Single precision floating expression.
DoubleConst(f64)
Double precision floating expression.
A unary expression, gathering a single expression and a unary operator.
A binary expression, gathering two expressions and a binary operator.
A ternary conditional expression, gathering three expressions.
Assignment(Box<Expr>, AssignmentOp, Box<Expr>)
An assignment is also an expression. Gathers an expression that defines what to assign to, an assignment operator and the value to associate with.
Bracket(Box<Expr>, ArraySpecifier)
Add an array specifier to an expression.
FunCall(FunIdentifier, Vec<Expr>)
A functional call. It has a function identifier and a list of expressions (arguments).
Dot(Box<Expr>, Identifier)
An expression associated with a field selection (struct).
Post-incrementation of an expression.
Post-decrementation of an expression.
An expression that contains several, separated with comma.
Trait Implementations
impl Parse for Expr
[src]
impl Host for Expr
[src]
impl Clone for Expr
[src]
impl PartialEq<Expr> for Expr
[src]
impl From<Expr> for Initializer
[src]
impl From<i32> for Expr
[src]
impl From<u32> for Expr
[src]
impl From<bool> for Expr
[src]
impl From<f32> for Expr
[src]
impl From<f64> for Expr
[src]
impl From<Expr> for Condition
[src]
impl Debug for Expr
[src]
Auto Trait Implementations
impl Send for Expr
impl Unpin for Expr
impl Sync for Expr
impl UnwindSafe for Expr
impl RefUnwindSafe for Expr
Blanket Implementations
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> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for 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,