pub enum ParamKind {
F32 {
min: f32,
max: f32,
default: f32,
step: Option<f32>,
},
U32 {
min: u32,
max: u32,
default: u32,
},
Bool {
default: bool,
},
Choice {
options: &'static [&'static str],
default: usize,
},
}Expand description
Type of a parameter, with its bounds and default.
Variants§
F32
A float, drawn as a slider.
Fields
U32
An unsigned integer, drawn as a slider.
Bool
A switch, drawn as a checkbox.
Choice
One of a list of named options, drawn as a dropdown.
Implementations§
Source§impl ParamKind
impl ParamKind
Sourcepub fn default_value(&self) -> ParamValue
pub fn default_value(&self) -> ParamValue
Returns the default as a value.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ParamKind
impl RefUnwindSafe for ParamKind
impl Send for ParamKind
impl Sync for ParamKind
impl Unpin for ParamKind
impl UnsafeUnpin for ParamKind
impl UnwindSafe for ParamKind
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