pub struct MotionStateMap {
pub values: HashMap<(WidgetId, MotionPropertyId), MotionValue>,
pub active: HashMap<(WidgetId, MotionPropertyId), ActiveMotion>,
pub presence: HashMap<WidgetId, PresencePhase>,
pub ripples: HashMap<WidgetId, Vec<SpawnedRipple>>,
}Expand description
Runtime storage for active motion values.
Shells own this through crate::RuntimeState. Tests and custom renderers
may inspect it to read deterministic motion progress.
Fields§
§values: HashMap<(WidgetId, MotionPropertyId), MotionValue>Last known value for each (widget, property) pair.
active: HashMap<(WidgetId, MotionPropertyId), ActiveMotion>Active transitions keyed by (widget, property).
presence: HashMap<WidgetId, PresencePhase>Current presence phase for each presence id.
ripples: HashMap<WidgetId, Vec<SpawnedRipple>>Active ripple instances for each ripple layer.
Implementations§
Source§impl MotionStateMap
impl MotionStateMap
Sourcepub fn scalar_value(
&self,
widget_id: WidgetId,
property: MotionPropertyId,
) -> f32
pub fn scalar_value( &self, widget_id: WidgetId, property: MotionPropertyId, ) -> f32
Returns a scalar-like value for a widget/property pair.
If no value has been produced yet, the property’s default value is used.
Trait Implementations§
Source§impl Clone for MotionStateMap
impl Clone for MotionStateMap
Source§fn clone(&self) -> MotionStateMap
fn clone(&self) -> MotionStateMap
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MotionStateMap
impl Debug for MotionStateMap
Source§impl Default for MotionStateMap
impl Default for MotionStateMap
Source§fn default() -> MotionStateMap
fn default() -> MotionStateMap
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for MotionStateMap
impl RefUnwindSafe for MotionStateMap
impl Send for MotionStateMap
impl Sync for MotionStateMap
impl Unpin for MotionStateMap
impl UnsafeUnpin for MotionStateMap
impl UnwindSafe for MotionStateMap
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>
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.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> 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)
Convert
&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)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.