pub enum Value<T> {
Fixed(T),
FromModulator {
id: ModulatorId,
mapping: ModulatorMapping<T>,
},
}
Expand description
A value that a parameter can be linked to.
Variants§
Fixed(T)
A fixed value.
FromModulator
Fields
§
id: ModulatorId
The modulator to link to.
§
mapping: ModulatorMapping<T>
How the modulator’s value should be converted to the parameter’s value.
The value of a modulator
.
Implementations§
source§impl<T> Value<T>
impl<T> Value<T>
sourcepub fn from_modulator(
id: impl Into<ModulatorId>,
mapping: ModulatorMapping<T>
) -> Self
pub fn from_modulator( id: impl Into<ModulatorId>, mapping: ModulatorMapping<T> ) -> Self
Creates a Value::FromModulator
from a modulator ID or handle.
Trait Implementations§
source§impl From<ClockSpeed> for Value<ClockSpeed>
impl From<ClockSpeed> for Value<ClockSpeed>
source§fn from(clock_speed: ClockSpeed) -> Self
fn from(clock_speed: ClockSpeed) -> Self
Converts to this type from the input type.
source§impl From<PlaybackRate> for Value<PlaybackRate>
impl From<PlaybackRate> for Value<PlaybackRate>
source§fn from(playback_rate: PlaybackRate) -> Self
fn from(playback_rate: PlaybackRate) -> Self
Converts to this type from the input type.
source§impl<T: PartialEq> PartialEq for Value<T>
impl<T: PartialEq> PartialEq for Value<T>
impl<T: Copy> Copy for Value<T>
impl<T> StructuralPartialEq for Value<T>
Auto Trait Implementations§
impl<T> RefUnwindSafe for Value<T>where
T: RefUnwindSafe,
impl<T> Send for Value<T>where
T: Send,
impl<T> Sync for Value<T>where
T: Sync,
impl<T> Unpin for Value<T>where
T: Unpin,
impl<T> UnwindSafe for Value<T>where
T: UnwindSafe,
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