[−][src]Struct iced_audio::core::range::IntRange
A range that defines a discrete linear range of i32 values
Implementations
impl IntRange
[src]
pub fn new(min: i32, max: i32) -> Self
[src]
Creates a new IntRange
Arguments
min
- the minimum of the range (inclusive)max
- the maximum of the range (inclusive)
Panics
This will panic if max
<= min
pub fn create_param<ID: Debug + Copy + Clone>(
&self,
id: ID,
value: i32,
default_value: i32
) -> Param<ID>
[src]
&self,
id: ID,
value: i32,
default_value: i32
) -> Param<ID>
Creates a new Param
with values mapped
from this range.
id
- A unique user-defined identifier for the parameter. This can be an enum, i32, u32, String, etc. Each parameter must have a uniqueID
value!value
- The inital value of the parameter.default_value
- The default value of the parameter.
pub fn create_param_default<ID: Debug + Copy + Clone>(
&self,
id: ID
) -> Param<ID>
[src]
&self,
id: ID
) -> Param<ID>
Creates a new Param
with values mapped
from this range where value
and default_value
is 0
.
id
- A unique user-defined identifier for the parameter. This can be an enum, i32, u32, String, etc. Each parameter must have a uniqueID
value!
pub fn snap_normal(&self, normal: &mut Normal)
[src]
Snaps a Normal
to the closest integer value in this
range.
pub fn to_normal(&self, value: i32) -> Normal
[src]
Returns the corresponding Normal
from the supplied value
pub fn to_value(&self, normal: Normal) -> i32
[src]
Returns the corresponding value from the supplied Normal
Trait Implementations
impl Clone for IntRange
[src]
impl Copy for IntRange
[src]
impl Debug for IntRange
[src]
impl Default for IntRange
[src]
Auto Trait Implementations
impl RefUnwindSafe for IntRange
impl Send for IntRange
impl Sync for IntRange
impl Unpin for IntRange
impl UnwindSafe for IntRange
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,