pub struct ParamRange {
pub min: Option<f32>,
pub max: Option<f32>,
pub step: Option<f32>,
}Expand description
Range constraints for a parameter
Fields§
§min: Option<f32>Minimum value (if applicable)
max: Option<f32>Maximum value (if applicable)
step: Option<f32>Step size (if applicable)
Implementations§
Source§impl ParamRange
impl ParamRange
Sourcepub fn new() -> ParamRange
pub fn new() -> ParamRange
Create a new empty range
Sourcepub fn with_min(self, min: f32) -> ParamRange
pub fn with_min(self, min: f32) -> ParamRange
Set minimum value
Sourcepub fn with_max(self, max: f32) -> ParamRange
pub fn with_max(self, max: f32) -> ParamRange
Set maximum value
Sourcepub fn with_step(self, step: f32) -> ParamRange
pub fn with_step(self, step: f32) -> ParamRange
Set step size
Trait Implementations§
Source§impl Clone for ParamRange
impl Clone for ParamRange
Source§fn clone(&self) -> ParamRange
fn clone(&self) -> ParamRange
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 ParamRange
impl Debug for ParamRange
Source§impl Default for ParamRange
impl Default for ParamRange
Source§fn default() -> ParamRange
fn default() -> ParamRange
Returns the “default value” for a type. Read more
Source§impl PartialEq for ParamRange
impl PartialEq for ParamRange
impl StructuralPartialEq for ParamRange
Auto Trait Implementations§
impl Freeze for ParamRange
impl RefUnwindSafe for ParamRange
impl Send for ParamRange
impl Sync for ParamRange
impl Unpin for ParamRange
impl UnsafeUnpin for ParamRange
impl UnwindSafe for ParamRange
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