#[non_exhaustive]pub enum AnimationTimingFunction {
Linear,
Ease,
EaseIn,
EaseOut,
EaseInOut,
StepStart,
StepEnd,
Steps(u32, StepPosition),
CubicBezier(f32, f32, f32, f32),
}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.
Trait Implementations§
Source§impl Clone for AnimationTimingFunction
impl Clone for AnimationTimingFunction
Source§fn clone(&self) -> AnimationTimingFunction
fn clone(&self) -> AnimationTimingFunction
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 moreimpl Copy for AnimationTimingFunction
Source§impl Debug for AnimationTimingFunction
impl Debug for AnimationTimingFunction
Source§impl Default for AnimationTimingFunction
impl Default for AnimationTimingFunction
Source§fn default() -> AnimationTimingFunction
fn default() -> AnimationTimingFunction
Returns the “default value” for a type. Read more
Source§impl<'i> FromCss<'i> for AnimationTimingFunction
impl<'i> FromCss<'i> for AnimationTimingFunction
Source§const VALID_TOKENS: &'static [CssToken]
const VALID_TOKENS: &'static [CssToken]
Returns the list of valid CSS tokens for this type.
Source§fn from_css(input: &mut Parser<'i, '_>) -> ParseResult<'i, Self>
fn from_css(input: &mut Parser<'i, '_>) -> ParseResult<'i, Self>
Parses the type from a
Parser instance.Source§fn from_str(source: &'i str) -> ParseResult<'i, Self>where
Self: Sized,
fn from_str(source: &'i str) -> ParseResult<'i, Self>where
Self: Sized,
Helper function to parse the type from a string.
Source§const EXPECT_MESSAGE: CssExpectedMessage = CssExpectedMessage::OneValue
const EXPECT_MESSAGE: CssExpectedMessage = CssExpectedMessage::OneValue
Message template used when building parse errors for this type.
Source§impl PartialEq for AnimationTimingFunction
impl PartialEq for AnimationTimingFunction
Source§fn eq(&self, other: &AnimationTimingFunction) -> bool
fn eq(&self, other: &AnimationTimingFunction) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for AnimationTimingFunction
Auto Trait Implementations§
impl Freeze 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