#[repr(C, u8)]pub enum TimingFunction<Integer, Number, LinearStops> {
Keyword(TimingKeyword),
CubicBezier {
x1: Number,
y1: Number,
x2: Number,
y2: Number,
},
Steps(Integer, StepPosition),
LinearFunction(LinearStops),
}
Expand description
A generic easing function.
Variants§
Keyword(TimingKeyword)
linear | ease | ease-in | ease-out | ease-in-out
CubicBezier
cubic-bezier(<number>, <number>, <number>, <number>)
Steps(Integer, StepPosition)
step-start | step-end | steps(<integer>, [ <step-position> ]?)
<step-position> = jump-start | jump-end | jump-none | jump-both | start | end
LinearFunction(LinearStops)
linear([
Implementations§
source§impl TimingFunction<i32, f32, PiecewiseLinearFunction>
impl TimingFunction<i32, f32, PiecewiseLinearFunction>
fn calculate_step_output( steps: i32, pos: StepPosition, progress: f64, before_flag: BeforeFlag, ) -> f64
sourcepub fn calculate_output(
&self,
progress: f64,
before_flag: BeforeFlag,
epsilon: f64,
) -> f64
pub fn calculate_output( &self, progress: f64, before_flag: BeforeFlag, epsilon: f64, ) -> f64
The output of the timing function given the progress ratio of this animation.
source§impl<Integer, Number, LinearStops> TimingFunction<Integer, Number, LinearStops>
impl<Integer, Number, LinearStops> TimingFunction<Integer, Number, LinearStops>
source§impl TimingFunction<Integer, Number, PiecewiseLinearFunction>
impl TimingFunction<Integer, Number, PiecewiseLinearFunction>
fn parse_cubic_bezier<'i, 't>( context: &ParserContext<'_>, input: &mut Parser<'i, 't>, ) -> Result<Self, ParseError<'i>>
fn parse_steps<'i, 't>( context: &ParserContext<'_>, input: &mut Parser<'i, 't>, ) -> Result<Self, ParseError<'i>>
fn parse_linear_function<'i, 't>( context: &ParserContext<'_>, input: &mut Parser<'i, 't>, ) -> Result<Self, ParseError<'i>>
sourcepub fn match_keywords(name: &AnimationName) -> bool
pub fn match_keywords(name: &AnimationName) -> bool
Returns true if the name matches any keyword.
source§impl TimingFunction<Integer, Number, PiecewiseLinearFunction>
impl TimingFunction<Integer, Number, PiecewiseLinearFunction>
sourcepub fn to_computed_value_without_context(&self) -> ComputedTimingFunction
pub fn to_computed_value_without_context(&self) -> ComputedTimingFunction
Generate the ComputedTimingFunction without Context.
Trait Implementations§
source§impl<Integer: Clone, Number: Clone, LinearStops: Clone> Clone for TimingFunction<Integer, Number, LinearStops>
impl<Integer: Clone, Number: Clone, LinearStops: Clone> Clone for TimingFunction<Integer, Number, LinearStops>
source§fn clone(&self) -> TimingFunction<Integer, Number, LinearStops>
fn clone(&self) -> TimingFunction<Integer, Number, LinearStops>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<Integer: Debug, Number: Debug, LinearStops: Debug> Debug for TimingFunction<Integer, Number, LinearStops>
impl<Integer: Debug, Number: Debug, LinearStops: Debug> Debug for TimingFunction<Integer, Number, LinearStops>
source§impl<'de, Integer, Number, LinearStops> Deserialize<'de> for TimingFunction<Integer, Number, LinearStops>
impl<'de, Integer, Number, LinearStops> Deserialize<'de> for TimingFunction<Integer, Number, LinearStops>
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
source§impl<Integer, Number, LinearStops> MallocSizeOf for TimingFunction<Integer, Number, LinearStops>
impl<Integer, Number, LinearStops> MallocSizeOf for TimingFunction<Integer, Number, LinearStops>
source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Measure the heap usage of all descendant heap-allocated structures, but
not the space taken up by the value itself.
source§impl<Integer: PartialEq, Number: PartialEq, LinearStops: PartialEq> PartialEq for TimingFunction<Integer, Number, LinearStops>
impl<Integer: PartialEq, Number: PartialEq, LinearStops: PartialEq> PartialEq for TimingFunction<Integer, Number, LinearStops>
source§fn eq(&self, other: &TimingFunction<Integer, Number, LinearStops>) -> bool
fn eq(&self, other: &TimingFunction<Integer, Number, LinearStops>) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.source§impl<Integer, Number, LinearStops> Serialize for TimingFunction<Integer, Number, LinearStops>
impl<Integer, Number, LinearStops> Serialize for TimingFunction<Integer, Number, LinearStops>
source§impl<Integer, Number, LinearStops> SpecifiedValueInfo for TimingFunction<Integer, Number, LinearStops>
impl<Integer, Number, LinearStops> SpecifiedValueInfo for TimingFunction<Integer, Number, LinearStops>
source§const SUPPORTED_TYPES: u8 = 4u8
const SUPPORTED_TYPES: u8 = 4u8
Supported CssTypes by the given value type. Read more
source§impl<Integer, Number, LinearStops> ToCss for TimingFunction<Integer, Number, LinearStops>
impl<Integer, Number, LinearStops> ToCss for TimingFunction<Integer, Number, LinearStops>
source§impl<Integer, Number, LinearStops> ToShmem for TimingFunction<Integer, Number, LinearStops>
impl<Integer, Number, LinearStops> ToShmem for TimingFunction<Integer, Number, LinearStops>
impl<Integer, Number, LinearStops> StructuralPartialEq for TimingFunction<Integer, Number, LinearStops>
Auto Trait Implementations§
impl<Integer, Number, LinearStops> Freeze for TimingFunction<Integer, Number, LinearStops>
impl<Integer, Number, LinearStops> RefUnwindSafe for TimingFunction<Integer, Number, LinearStops>
impl<Integer, Number, LinearStops> Send for TimingFunction<Integer, Number, LinearStops>
impl<Integer, Number, LinearStops> Sync for TimingFunction<Integer, Number, LinearStops>
impl<Integer, Number, LinearStops> Unpin for TimingFunction<Integer, Number, LinearStops>
impl<Integer, Number, LinearStops> UnwindSafe for TimingFunction<Integer, Number, LinearStops>
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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 moresource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert