pub struct AnimationSpec {
pub halo: HaloSpec,
pub transition: TransitionSpec,
pub reduced_motion: bool,
}Fields§
§halo: HaloSpec§transition: TransitionSpec§reduced_motion: boolHonors prefers-reduced-motion: collapses transitions to a snap and
freezes the pulse. The host sets this from matchMedia.
Implementations§
Source§impl AnimationSpec
impl AnimationSpec
Sourcepub fn effective_duration(&self) -> f32
pub fn effective_duration(&self) -> f32
Transition duration honoring reduced_motion (0 => snap).
Sourcepub fn pulse_animates(&self) -> bool
pub fn pulse_animates(&self) -> bool
Whether the halo pulse advances (frozen under reduced_motion).
Trait Implementations§
Source§impl Clone for AnimationSpec
impl Clone for AnimationSpec
Source§fn clone(&self) -> AnimationSpec
fn clone(&self) -> AnimationSpec
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 AnimationSpec
impl Debug for AnimationSpec
Source§impl Default for AnimationSpec
impl Default for AnimationSpec
Source§fn default() -> AnimationSpec
fn default() -> AnimationSpec
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for AnimationSpecwhere
AnimationSpec: Default,
impl<'de> Deserialize<'de> for AnimationSpecwhere
AnimationSpec: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for AnimationSpec
impl RefUnwindSafe for AnimationSpec
impl Send for AnimationSpec
impl Sync for AnimationSpec
impl Unpin for AnimationSpec
impl UnsafeUnpin for AnimationSpec
impl UnwindSafe for AnimationSpec
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