Struct bevy_retrograde::audio::kira::CachedValue [−]
Expand description
A wrapper around Value
s that remembers the last valid raw value.
You’ll only need to use this if you’re writing your own effects.
Implementations
pub fn new(value: Value<T>, default_value: T) -> CachedValue<T>
pub fn new(value: Value<T>, default_value: T) -> CachedValue<T>
Creates a CachedValue
with an initial value setting
and a default raw value to fall back on.
pub fn with_min(self, min: T) -> CachedValue<T>
pub fn with_min(self, min: T) -> CachedValue<T>
Sets the minimum valid value of this CachedValue
.
pub fn with_max(self, max: T) -> CachedValue<T>
pub fn with_max(self, max: T) -> CachedValue<T>
Sets the maximum valid value of this CachedValue
.
pub fn with_valid_range(self, range: Range<T>) -> CachedValue<T>
pub fn with_valid_range(self, range: Range<T>) -> CachedValue<T>
Sets the min and max valid values of this CachedValue
.
pub fn update(&mut self, parameters: &Parameters)
pub fn update(&mut self, parameters: &Parameters)
If the value is set to a parameter, updates the raw value from the parameter (if it exists).
pub fn value(&self) -> T
pub fn value(&self) -> T
Gets the last valid raw value.
Trait Implementations
pub fn clone(&self) -> CachedValue<T>
pub fn clone(&self) -> CachedValue<T>
Returns a copy of the value. Read more
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl<T> RefUnwindSafe for CachedValue<T> where
T: RefUnwindSafe,
impl<T> Send for CachedValue<T> where
T: Send,
impl<T> Sync for CachedValue<T> where
T: Sync,
impl<T> Unpin for CachedValue<T> where
T: Unpin,
impl<T> UnwindSafe for CachedValue<T> where
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
impl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read more
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
pub fn clone_type_data(&self) -> Box<dyn TypeData + 'static, Global>
pub fn vzip(self) -> V