pub enum GlslConstant {
Float(f64),
Int(i64),
Bool(bool),
Vec(Vec<f64>),
}Expand description
A folded GLSL constant value.
Variants§
Implementations§
Source§impl GlslConstant
impl GlslConstant
Sourcepub fn to_glsl_literal(&self) -> String
pub fn to_glsl_literal(&self) -> String
Emit as a GLSL literal string.
Sourcepub fn add(&self, other: &GlslConstant) -> Option<GlslConstant>
pub fn add(&self, other: &GlslConstant) -> Option<GlslConstant>
Add two compatible constants.
Trait Implementations§
Source§impl Clone for GlslConstant
impl Clone for GlslConstant
Source§fn clone(&self) -> GlslConstant
fn clone(&self) -> GlslConstant
Returns a duplicate 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 GlslConstant
impl Debug for GlslConstant
Source§impl PartialEq for GlslConstant
impl PartialEq for GlslConstant
impl StructuralPartialEq for GlslConstant
Auto Trait Implementations§
impl Freeze for GlslConstant
impl RefUnwindSafe for GlslConstant
impl Send for GlslConstant
impl Sync for GlslConstant
impl Unpin for GlslConstant
impl UnsafeUnpin for GlslConstant
impl UnwindSafe for GlslConstant
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