pub enum ParamValue {
Int(i32),
Float(f32),
Bool(bool),
String(String),
Vec3([f32; 3]),
}Expand description
Native-Rust parameter value.
Mirrors proto::plugin::ParamValue (a oneof on the wire) but in
ergonomic enum form for the Plugin trait surface. Wire-native
conversion happens at the IPC boundary.
Variants§
Int(i32)
32-bit signed integer.
Float(f32)
32-bit float.
Bool(bool)
Boolean.
String(String)
Used for both PARAM_TYPE_STRING and PARAM_TYPE_ENUM.
Vec3([f32; 3])
3-component float vector (positions, axes, etc.).
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 (const: unstable) · 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
Source§fn eq(&self, other: &ParamValue) -> bool
fn eq(&self, other: &ParamValue) -> bool
Tests for
self and other values to be equal, and is used by ==.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