Struct vst::util::ParameterTransfer

source ·
pub struct ParameterTransfer { /* private fields */ }
Expand description

A set of parameters that can be shared between threads.

Supports efficient iteration over parameters that changed since last iteration.

Implementations§

Create a new parameter set with parameter_count parameters.

Set the value of the parameter with index index to value and mark it as changed.

Get the current value of the parameter with index index.

Iterate over all parameters marked as changed. If acquire is true, mark all returned parameters as no longer changed.

The iterator returns a pair of (index, value) for each changed parameter.

When parameters have been changed on the current thread, the iterator is precise: it reports all changed parameters with the values they were last changed to.

When parameters are changed on a different thread, the iterator is conservative, in the sense that it is guaranteed to report changed parameters eventually, but if a parameter is changed multiple times in a short period of time, it may skip some of the changes (but never the last) and may report an extra, spurious change at the end.

The changed parameters are reported in increasing index order, and the same parameter is never reported more than once in the same iteration.

Trait Implementations§

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.