#[non_exhaustive]pub enum ParamData {
Show 20 variants
F32(f32),
F64(f64),
I32(i32),
U32(u32),
I64(i64),
U64(u64),
Bool(bool),
Volume(Volume),
Vector2D(Vec2),
Vector3D(Vec3),
EventInstant(EventInstant),
InstantSeconds(InstantSeconds),
DurationSeconds(DurationSeconds),
InstantSamples(InstantSamples),
DurationSamples(DurationSamples),
InstantMusical(InstantMusical),
DurationMusical(DurationMusical),
Any(ArcGc<dyn Any + Send + Sync>),
CustomBytes([u8; 20]),
None,
}Expand description
Data that can be used to patch an individual parameter.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
F32(f32)
F64(f64)
I32(i32)
U32(u32)
I64(i64)
U64(u64)
Bool(bool)
Volume(Volume)
Vector2D(Vec2)
Vector3D(Vec3)
EventInstant(EventInstant)
InstantSeconds(InstantSeconds)
DurationSeconds(DurationSeconds)
InstantSamples(InstantSamples)
DurationSamples(DurationSamples)
InstantMusical(InstantMusical)
DurationMusical(DurationMusical)
Any(ArcGc<dyn Any + Send + Sync>)
Custom type stored on the heap.
CustomBytes([u8; 20])
Custom type stored on the stack as raw bytes.
None
No data (i.e. the type is None).
Implementations§
Source§impl ParamData
impl ParamData
Sourcepub fn any<T: Send + Sync + 'static>(value: T) -> Self
pub fn any<T: Send + Sync + 'static>(value: T) -> Self
Construct a ParamData::Any variant.
Sourcepub fn opt_any<T: Any + Send + Sync + 'static>(value: Option<T>) -> Self
pub fn opt_any<T: Any + Send + Sync + 'static>(value: Option<T>) -> Self
Construct an optional ParamData::Any variant.
Sourcepub fn downcast_ref<T: Any>(&self) -> Option<&T>
pub fn downcast_ref<T: Any>(&self) -> Option<&T>
Try to downcast ParamData::Any into T.
If this enum doesn’t hold ParamData::Any or the downcast fails,
then this returns None.
Trait Implementations§
Source§impl From<DurationMusical> for ParamData
impl From<DurationMusical> for ParamData
Source§fn from(value: DurationMusical) -> Self
fn from(value: DurationMusical) -> Self
Converts to this type from the input type.
Source§impl From<DurationSamples> for ParamData
impl From<DurationSamples> for ParamData
Source§fn from(value: DurationSamples) -> Self
fn from(value: DurationSamples) -> Self
Converts to this type from the input type.
Source§impl From<DurationSeconds> for ParamData
impl From<DurationSeconds> for ParamData
Source§fn from(value: DurationSeconds) -> Self
fn from(value: DurationSeconds) -> Self
Converts to this type from the input type.
Source§impl From<EventInstant> for ParamData
impl From<EventInstant> for ParamData
Source§fn from(value: EventInstant) -> Self
fn from(value: EventInstant) -> Self
Converts to this type from the input type.
Source§impl From<InstantMusical> for ParamData
impl From<InstantMusical> for ParamData
Source§fn from(value: InstantMusical) -> Self
fn from(value: InstantMusical) -> Self
Converts to this type from the input type.
Source§impl From<InstantSamples> for ParamData
impl From<InstantSamples> for ParamData
Source§fn from(value: InstantSamples) -> Self
fn from(value: InstantSamples) -> Self
Converts to this type from the input type.
Source§impl From<InstantSeconds> for ParamData
impl From<InstantSeconds> for ParamData
Source§fn from(value: InstantSeconds) -> Self
fn from(value: InstantSeconds) -> Self
Converts to this type from the input type.
Source§impl From<Notify<DurationMusical>> for ParamData
impl From<Notify<DurationMusical>> for ParamData
Source§fn from(value: Notify<DurationMusical>) -> Self
fn from(value: Notify<DurationMusical>) -> Self
Converts to this type from the input type.
Source§impl From<Notify<DurationSamples>> for ParamData
impl From<Notify<DurationSamples>> for ParamData
Source§fn from(value: Notify<DurationSamples>) -> Self
fn from(value: Notify<DurationSamples>) -> Self
Converts to this type from the input type.
Source§impl From<Notify<DurationSeconds>> for ParamData
impl From<Notify<DurationSeconds>> for ParamData
Source§fn from(value: Notify<DurationSeconds>) -> Self
fn from(value: Notify<DurationSeconds>) -> Self
Converts to this type from the input type.
Source§impl From<Notify<EventInstant>> for ParamData
impl From<Notify<EventInstant>> for ParamData
Source§fn from(value: Notify<EventInstant>) -> Self
fn from(value: Notify<EventInstant>) -> Self
Converts to this type from the input type.
Source§impl From<Notify<InstantMusical>> for ParamData
impl From<Notify<InstantMusical>> for ParamData
Source§fn from(value: Notify<InstantMusical>) -> Self
fn from(value: Notify<InstantMusical>) -> Self
Converts to this type from the input type.
Source§impl From<Notify<InstantSamples>> for ParamData
impl From<Notify<InstantSamples>> for ParamData
Source§fn from(value: Notify<InstantSamples>) -> Self
fn from(value: Notify<InstantSamples>) -> Self
Converts to this type from the input type.
Source§impl From<Notify<InstantSeconds>> for ParamData
impl From<Notify<InstantSeconds>> for ParamData
Source§fn from(value: Notify<InstantSeconds>) -> Self
fn from(value: Notify<InstantSeconds>) -> Self
Converts to this type from the input type.
Source§impl From<Option<DurationMusical>> for ParamData
impl From<Option<DurationMusical>> for ParamData
Source§fn from(value: Option<DurationMusical>) -> Self
fn from(value: Option<DurationMusical>) -> Self
Converts to this type from the input type.
Source§impl From<Option<DurationSamples>> for ParamData
impl From<Option<DurationSamples>> for ParamData
Source§fn from(value: Option<DurationSamples>) -> Self
fn from(value: Option<DurationSamples>) -> Self
Converts to this type from the input type.
Source§impl From<Option<DurationSeconds>> for ParamData
impl From<Option<DurationSeconds>> for ParamData
Source§fn from(value: Option<DurationSeconds>) -> Self
fn from(value: Option<DurationSeconds>) -> Self
Converts to this type from the input type.
Source§impl From<Option<EventInstant>> for ParamData
impl From<Option<EventInstant>> for ParamData
Source§fn from(value: Option<EventInstant>) -> Self
fn from(value: Option<EventInstant>) -> Self
Converts to this type from the input type.
Source§impl From<Option<InstantMusical>> for ParamData
impl From<Option<InstantMusical>> for ParamData
Source§fn from(value: Option<InstantMusical>) -> Self
fn from(value: Option<InstantMusical>) -> Self
Converts to this type from the input type.
Source§impl From<Option<InstantSamples>> for ParamData
impl From<Option<InstantSamples>> for ParamData
Source§fn from(value: Option<InstantSamples>) -> Self
fn from(value: Option<InstantSamples>) -> Self
Converts to this type from the input type.
Source§impl From<Option<InstantSeconds>> for ParamData
impl From<Option<InstantSeconds>> for ParamData
Source§fn from(value: Option<InstantSeconds>) -> Self
fn from(value: Option<InstantSeconds>) -> Self
Converts to this type from the input type.
Source§impl TryInto<()> for &ParamData
impl TryInto<()> for &ParamData
Source§type Error = PatchError
type Error = PatchError
The type returned in the event of a conversion error.
Source§impl TryInto<DurationMusical> for &ParamData
impl TryInto<DurationMusical> for &ParamData
Source§type Error = PatchError
type Error = PatchError
The type returned in the event of a conversion error.
Source§fn try_into(self) -> Result<DurationMusical, PatchError>
fn try_into(self) -> Result<DurationMusical, PatchError>
Performs the conversion.
Source§impl TryInto<DurationSamples> for &ParamData
impl TryInto<DurationSamples> for &ParamData
Source§type Error = PatchError
type Error = PatchError
The type returned in the event of a conversion error.
Source§fn try_into(self) -> Result<DurationSamples, PatchError>
fn try_into(self) -> Result<DurationSamples, PatchError>
Performs the conversion.
Source§impl TryInto<DurationSeconds> for &ParamData
impl TryInto<DurationSeconds> for &ParamData
Source§type Error = PatchError
type Error = PatchError
The type returned in the event of a conversion error.
Source§fn try_into(self) -> Result<DurationSeconds, PatchError>
fn try_into(self) -> Result<DurationSeconds, PatchError>
Performs the conversion.
Source§impl TryInto<EventInstant> for &ParamData
impl TryInto<EventInstant> for &ParamData
Source§type Error = PatchError
type Error = PatchError
The type returned in the event of a conversion error.
Source§fn try_into(self) -> Result<EventInstant, PatchError>
fn try_into(self) -> Result<EventInstant, PatchError>
Performs the conversion.
Source§impl TryInto<InstantMusical> for &ParamData
impl TryInto<InstantMusical> for &ParamData
Source§type Error = PatchError
type Error = PatchError
The type returned in the event of a conversion error.
Source§fn try_into(self) -> Result<InstantMusical, PatchError>
fn try_into(self) -> Result<InstantMusical, PatchError>
Performs the conversion.
Source§impl TryInto<InstantSamples> for &ParamData
impl TryInto<InstantSamples> for &ParamData
Source§type Error = PatchError
type Error = PatchError
The type returned in the event of a conversion error.
Source§fn try_into(self) -> Result<InstantSamples, PatchError>
fn try_into(self) -> Result<InstantSamples, PatchError>
Performs the conversion.
Source§impl TryInto<InstantSeconds> for &ParamData
impl TryInto<InstantSeconds> for &ParamData
Source§type Error = PatchError
type Error = PatchError
The type returned in the event of a conversion error.
Source§fn try_into(self) -> Result<InstantSeconds, PatchError>
fn try_into(self) -> Result<InstantSeconds, PatchError>
Performs the conversion.
Source§impl TryInto<Notify<DurationMusical>> for &ParamData
impl TryInto<Notify<DurationMusical>> for &ParamData
Source§type Error = PatchError
type Error = PatchError
The type returned in the event of a conversion error.
Source§fn try_into(self) -> Result<Notify<DurationMusical>, PatchError>
fn try_into(self) -> Result<Notify<DurationMusical>, PatchError>
Performs the conversion.
Source§impl TryInto<Notify<DurationSamples>> for &ParamData
impl TryInto<Notify<DurationSamples>> for &ParamData
Source§type Error = PatchError
type Error = PatchError
The type returned in the event of a conversion error.
Source§fn try_into(self) -> Result<Notify<DurationSamples>, PatchError>
fn try_into(self) -> Result<Notify<DurationSamples>, PatchError>
Performs the conversion.
Source§impl TryInto<Notify<DurationSeconds>> for &ParamData
impl TryInto<Notify<DurationSeconds>> for &ParamData
Source§type Error = PatchError
type Error = PatchError
The type returned in the event of a conversion error.
Source§fn try_into(self) -> Result<Notify<DurationSeconds>, PatchError>
fn try_into(self) -> Result<Notify<DurationSeconds>, PatchError>
Performs the conversion.
Source§impl TryInto<Notify<EventInstant>> for &ParamData
impl TryInto<Notify<EventInstant>> for &ParamData
Source§type Error = PatchError
type Error = PatchError
The type returned in the event of a conversion error.
Source§fn try_into(self) -> Result<Notify<EventInstant>, PatchError>
fn try_into(self) -> Result<Notify<EventInstant>, PatchError>
Performs the conversion.
Source§impl TryInto<Notify<InstantMusical>> for &ParamData
impl TryInto<Notify<InstantMusical>> for &ParamData
Source§type Error = PatchError
type Error = PatchError
The type returned in the event of a conversion error.
Source§fn try_into(self) -> Result<Notify<InstantMusical>, PatchError>
fn try_into(self) -> Result<Notify<InstantMusical>, PatchError>
Performs the conversion.
Source§impl TryInto<Notify<InstantSamples>> for &ParamData
impl TryInto<Notify<InstantSamples>> for &ParamData
Source§type Error = PatchError
type Error = PatchError
The type returned in the event of a conversion error.
Source§fn try_into(self) -> Result<Notify<InstantSamples>, PatchError>
fn try_into(self) -> Result<Notify<InstantSamples>, PatchError>
Performs the conversion.
Source§impl TryInto<Notify<InstantSeconds>> for &ParamData
impl TryInto<Notify<InstantSeconds>> for &ParamData
Source§type Error = PatchError
type Error = PatchError
The type returned in the event of a conversion error.
Source§fn try_into(self) -> Result<Notify<InstantSeconds>, PatchError>
fn try_into(self) -> Result<Notify<InstantSeconds>, PatchError>
Performs the conversion.
Source§impl TryInto<Option<DurationMusical>> for &ParamData
impl TryInto<Option<DurationMusical>> for &ParamData
Source§type Error = PatchError
type Error = PatchError
The type returned in the event of a conversion error.
Source§fn try_into(self) -> Result<Option<DurationMusical>, PatchError>
fn try_into(self) -> Result<Option<DurationMusical>, PatchError>
Performs the conversion.
Source§impl TryInto<Option<DurationSamples>> for &ParamData
impl TryInto<Option<DurationSamples>> for &ParamData
Source§type Error = PatchError
type Error = PatchError
The type returned in the event of a conversion error.
Source§fn try_into(self) -> Result<Option<DurationSamples>, PatchError>
fn try_into(self) -> Result<Option<DurationSamples>, PatchError>
Performs the conversion.
Source§impl TryInto<Option<DurationSeconds>> for &ParamData
impl TryInto<Option<DurationSeconds>> for &ParamData
Source§type Error = PatchError
type Error = PatchError
The type returned in the event of a conversion error.
Source§fn try_into(self) -> Result<Option<DurationSeconds>, PatchError>
fn try_into(self) -> Result<Option<DurationSeconds>, PatchError>
Performs the conversion.
Source§impl TryInto<Option<EventInstant>> for &ParamData
impl TryInto<Option<EventInstant>> for &ParamData
Source§type Error = PatchError
type Error = PatchError
The type returned in the event of a conversion error.
Source§fn try_into(self) -> Result<Option<EventInstant>, PatchError>
fn try_into(self) -> Result<Option<EventInstant>, PatchError>
Performs the conversion.
Source§impl TryInto<Option<InstantMusical>> for &ParamData
impl TryInto<Option<InstantMusical>> for &ParamData
Source§type Error = PatchError
type Error = PatchError
The type returned in the event of a conversion error.
Source§fn try_into(self) -> Result<Option<InstantMusical>, PatchError>
fn try_into(self) -> Result<Option<InstantMusical>, PatchError>
Performs the conversion.
Source§impl TryInto<Option<InstantSamples>> for &ParamData
impl TryInto<Option<InstantSamples>> for &ParamData
Source§type Error = PatchError
type Error = PatchError
The type returned in the event of a conversion error.
Source§fn try_into(self) -> Result<Option<InstantSamples>, PatchError>
fn try_into(self) -> Result<Option<InstantSamples>, PatchError>
Performs the conversion.
Source§impl TryInto<Option<InstantSeconds>> for &ParamData
impl TryInto<Option<InstantSeconds>> for &ParamData
Source§type Error = PatchError
type Error = PatchError
The type returned in the event of a conversion error.
Source§fn try_into(self) -> Result<Option<InstantSeconds>, PatchError>
fn try_into(self) -> Result<Option<InstantSeconds>, PatchError>
Performs the conversion.
Source§impl TryInto<Vec2> for &ParamData
impl TryInto<Vec2> for &ParamData
Source§type Error = PatchError
type Error = PatchError
The type returned in the event of a conversion error.
Source§impl TryInto<Vec2> for &ParamData
impl TryInto<Vec2> for &ParamData
Source§type Error = PatchError
type Error = PatchError
The type returned in the event of a conversion error.
Source§impl TryInto<Vec2> for &ParamData
impl TryInto<Vec2> for &ParamData
Source§type Error = PatchError
type Error = PatchError
The type returned in the event of a conversion error.
Source§impl TryInto<Vec3> for &ParamData
impl TryInto<Vec3> for &ParamData
Source§type Error = PatchError
type Error = PatchError
The type returned in the event of a conversion error.
Source§impl TryInto<Vec3> for &ParamData
impl TryInto<Vec3> for &ParamData
Source§type Error = PatchError
type Error = PatchError
The type returned in the event of a conversion error.
Source§impl TryInto<Vec3> for &ParamData
impl TryInto<Vec3> for &ParamData
Source§type Error = PatchError
type Error = PatchError
The type returned in the event of a conversion error.
Source§impl TryInto<Volume> for &ParamData
impl TryInto<Volume> for &ParamData
Source§type Error = PatchError
type Error = PatchError
The type returned in the event of a conversion error.
Source§impl TryInto<bool> for &ParamData
impl TryInto<bool> for &ParamData
Source§type Error = PatchError
type Error = PatchError
The type returned in the event of a conversion error.
Source§impl TryInto<f32> for &ParamData
impl TryInto<f32> for &ParamData
Source§type Error = PatchError
type Error = PatchError
The type returned in the event of a conversion error.
Source§impl TryInto<f64> for &ParamData
impl TryInto<f64> for &ParamData
Source§type Error = PatchError
type Error = PatchError
The type returned in the event of a conversion error.
Source§impl TryInto<i32> for &ParamData
impl TryInto<i32> for &ParamData
Source§type Error = PatchError
type Error = PatchError
The type returned in the event of a conversion error.
Source§impl TryInto<i64> for &ParamData
impl TryInto<i64> for &ParamData
Source§type Error = PatchError
type Error = PatchError
The type returned in the event of a conversion error.
Auto Trait Implementations§
impl Freeze for ParamData
impl !RefUnwindSafe for ParamData
impl Send for ParamData
impl Sync for ParamData
impl Unpin for ParamData
impl !UnwindSafe for ParamData
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
Source§fn into_result(self) -> Result<T, RunSystemError>
fn into_result(self) -> Result<T, RunSystemError>
Converts this type into the system output type.
Source§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
Source§impl<T> TypeData for T
impl<T> TypeData for T
Source§fn clone_type_data(&self) -> Box<dyn TypeData>
fn clone_type_data(&self) -> Box<dyn TypeData>
Creates a type-erased clone of this value.