#[non_exhaustive]pub enum AnimationTimingFunction {
Linear,
Ease,
EaseIn,
EaseOut,
EaseInOut,
StepStart,
StepEnd,
Steps(u32, StepPosition),
CubicBezier(f32, f32, f32, f32),
LinearCurve(LinearEasing),
}Expand description
Supported CSS timing functions for animations.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Linear
Uses linear interpolation.
Ease
Uses the CSS ease curve.
EaseIn
Uses the CSS ease-in curve.
EaseOut
Uses the CSS ease-out curve.
EaseInOut
Uses the CSS ease-in-out curve.
StepStart
Uses the CSS step-start timing function.
StepEnd
Uses the CSS step-end timing function.
Steps(u32, StepPosition)
Uses a stepped timing function with an explicit position.
CubicBezier(f32, f32, f32, f32)
Uses a custom cubic bezier timing curve.
LinearCurve(LinearEasing)
Uses a linear() curve through its control points.
Trait Implementations§
Source§impl Clone for AnimationTimingFunction
impl Clone for AnimationTimingFunction
impl Copy for AnimationTimingFunction
Source§impl Debug for AnimationTimingFunction
impl Debug for AnimationTimingFunction
Source§impl Default for AnimationTimingFunction
impl Default for AnimationTimingFunction
Source§impl PartialEq for AnimationTimingFunction
impl PartialEq for AnimationTimingFunction
impl StructuralPartialEq for AnimationTimingFunction
Source§impl ToCss for AnimationTimingFunction
impl ToCss for AnimationTimingFunction
Source§fn to_css<W: Write>(&self, dest: &mut W) -> Result
fn to_css<W: Write>(&self, dest: &mut W) -> Result
Write the CSS representation of this value into
dest.Source§const LIST_SEPARATOR: &'static str = ", "
const LIST_SEPARATOR: &'static str = ", "
The separator between list items,
", " unless the grammar is space-separated.Source§const EMPTY_LIST_KEYWORD: Option<&'static str> = None
const EMPTY_LIST_KEYWORD: Option<&'static str> = None
The keyword an empty list serializes to, such as
none, or None for an empty string.Source§fn to_css_string(&self) -> String
fn to_css_string(&self) -> String
The CSS representation of this value as an owned
String.Auto Trait Implementations§
impl Forget for AnimationTimingFunction
impl Freeze for AnimationTimingFunction
impl Move for AnimationTimingFunction
impl RefUnwindSafe for AnimationTimingFunction
impl Send for AnimationTimingFunction
impl Sync for AnimationTimingFunction
impl Unpin for AnimationTimingFunction
impl UnsafeUnpin for AnimationTimingFunction
impl UnwindSafe for AnimationTimingFunction
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,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> FromCssStr for Twhere
T: for<'i> FromCss<'i>,
impl<T> FromCssStr for Twhere
T: for<'i> FromCss<'i>,
Source§fn from_css_str(source: &str) -> Result<T, ParseError>
fn from_css_str(source: &str) -> Result<T, ParseError>
Parses
source into this value type.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more