pub enum Animation {
Default {},
Curve {
curve: AnimationCurve,
duration_seconds: Option<f64>,
},
}
Expand description
An animation to use for smooth view transitions.
Variants§
Implementations§
Source§impl Animation
impl Animation
pub const LINEAR: Self
pub const EASE_IN: Self
pub const EASE_OUT: Self
pub const EASE_IN_OUT: Self
Sourcepub fn curve(curve: AnimationCurve, duration: Option<Duration>) -> Self
pub fn curve(curve: AnimationCurve, duration: Option<Duration>) -> Self
Creates an animation with the given curve and the given duration (or default if none).
Sourcepub fn linear(duration: Duration) -> Self
pub fn linear(duration: Duration) -> Self
Creates an animation with a linear curve and the given duration (or default if none).
Sourcepub fn ease_in(duration: Duration) -> Self
pub fn ease_in(duration: Duration) -> Self
Creates an animation with an ease-in curve and the given duration (or default if none).
Sourcepub fn ease_out(duration: Duration) -> Self
pub fn ease_out(duration: Duration) -> Self
Creates an animation with an ease-out curve and the given duration (or default if none).
Sourcepub fn ease_in_out(duration: Duration) -> Self
pub fn ease_in_out(duration: Duration) -> Self
Creates an animation with an ease-in/out curve and the given duration (or default if none).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Animation
impl<'de> Deserialize<'de> for Animation
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
impl Copy for Animation
impl StructuralPartialEq for Animation
Auto Trait Implementations§
impl Freeze for Animation
impl RefUnwindSafe for Animation
impl Send for Animation
impl Sync for Animation
impl Unpin for Animation
impl UnwindSafe for Animation
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