pub struct ParamStore { /* private fields */ }Expand description
The values a running state holds, with the live/reload decision cached from the descriptors.
The decision is cached, so set_param can reject a reload-only index without rebuilding the
descriptor list every time a slider moves.
Implementations§
Source§impl ParamStore
impl ParamStore
Sourcepub fn new(descriptors: &[ParamDescriptor], values: &[ParamValue]) -> Self
pub fn new(descriptors: &[ParamDescriptor], values: &[ParamValue]) -> Self
Creates a store holding values, with the apply mode of each descriptor in descriptors.
Sourcepub fn values(&self) -> &[ParamValue]
pub fn values(&self) -> &[ParamValue]
Current values, in descriptor order.
Sourcepub fn set(&mut self, index: usize, value: &ParamValue) -> bool
pub fn set(&mut self, index: usize, value: &ParamValue) -> bool
Sets parameter index to value if the parameter is live, and returns whether the value was set.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ParamStore
impl RefUnwindSafe for ParamStore
impl Send for ParamStore
impl Sync for ParamStore
impl Unpin for ParamStore
impl UnsafeUnpin for ParamStore
impl UnwindSafe for ParamStore
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