pub enum ParamValue {
Float(f32),
Vec2([f32; 2]),
Vec3([f32; 3]),
Vec4([f32; 4]),
Int(i32),
Bool(bool),
String(String),
}Expand description
Concrete parameter value that can be stored in a socket default or node property.
Variants§
Implementations§
Source§impl ParamValue
impl ParamValue
pub fn as_float(&self) -> Option<f32>
pub fn as_vec2(&self) -> Option<[f32; 2]>
pub fn as_vec3(&self) -> Option<[f32; 3]>
pub fn as_vec4(&self) -> Option<[f32; 4]>
pub fn as_int(&self) -> Option<i32>
pub fn as_bool(&self) -> Option<bool>
pub fn as_string(&self) -> Option<&str>
Trait Implementations§
Source§impl Clone for ParamValue
impl Clone for ParamValue
Source§fn clone(&self) -> ParamValue
fn clone(&self) -> ParamValue
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 ParamValue
impl Debug for ParamValue
Source§impl PartialEq for ParamValue
impl PartialEq for ParamValue
impl StructuralPartialEq for ParamValue
Auto Trait Implementations§
impl Freeze for ParamValue
impl RefUnwindSafe for ParamValue
impl Send for ParamValue
impl Sync for ParamValue
impl Unpin for ParamValue
impl UnsafeUnpin for ParamValue
impl UnwindSafe for ParamValue
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