pub type TimingFunction = TimingFunction<Integer, Number, PiecewiseLinearFunction>;
Expand description
A specified timing function.
Aliased Type§
enum TimingFunction {
Keyword(TimingKeyword),
CubicBezier {
x1: Number,
y1: Number,
x2: Number,
y2: Number,
},
Steps(Integer, StepPosition),
LinearFunction(PiecewiseLinearFunction),
}
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(PiecewiseLinearFunction)
linear([
Implementations§
source§impl TimingFunction
impl TimingFunction
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>>
source§impl TimingFunction
impl TimingFunction
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>where
Integer: Deserialize<'de>,
Number: Deserialize<'de>,
LinearStops: Deserialize<'de>,
impl<'de, Integer, Number, LinearStops> Deserialize<'de> for TimingFunction<Integer, Number, LinearStops>where Integer: Deserialize<'de>, Number: Deserialize<'de>, LinearStops: Deserialize<'de>,
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>where
Integer: MallocSizeOf,
Number: MallocSizeOf,
LinearStops: MallocSizeOf,
impl<Integer, Number, LinearStops> MallocSizeOf for TimingFunction<Integer, Number, LinearStops>where Integer: MallocSizeOf, Number: MallocSizeOf, LinearStops: MallocSizeOf,
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 Parse for TimingFunction
impl Parse for TimingFunction
source§fn parse<'i, 't>(
context: &ParserContext<'_>,
input: &mut Parser<'i, 't>
) -> Result<Self, ParseError<'i>>
fn parse<'i, 't>( context: &ParserContext<'_>, input: &mut Parser<'i, 't> ) -> Result<Self, ParseError<'i>>
Parse a value of this type. Read more
source§impl<Integer: PartialEq, Number: PartialEq, LinearStops: PartialEq> PartialEq<TimingFunction<Integer, Number, LinearStops>> for TimingFunction<Integer, Number, LinearStops>
impl<Integer: PartialEq, Number: PartialEq, LinearStops: PartialEq> PartialEq<TimingFunction<Integer, Number, LinearStops>> for TimingFunction<Integer, Number, LinearStops>
source§fn eq(&self, other: &TimingFunction<Integer, Number, LinearStops>) -> bool
fn eq(&self, other: &TimingFunction<Integer, Number, LinearStops>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<Integer, Number, LinearStops> Serialize for TimingFunction<Integer, Number, LinearStops>where
Integer: Serialize,
Number: Serialize,
LinearStops: Serialize,
impl<Integer, Number, LinearStops> Serialize for TimingFunction<Integer, Number, LinearStops>where Integer: Serialize, Number: Serialize, LinearStops: Serialize,
source§impl<Integer, Number, LinearStops> SpecifiedValueInfo for TimingFunction<Integer, Number, LinearStops>where
Integer: SpecifiedValueInfo,
Number: SpecifiedValueInfo,
LinearStops: SpecifiedValueInfo,
impl<Integer, Number, LinearStops> SpecifiedValueInfo for TimingFunction<Integer, Number, LinearStops>where Integer: SpecifiedValueInfo, Number: SpecifiedValueInfo, LinearStops: SpecifiedValueInfo,
source§const SUPPORTED_TYPES: u8 = 4u8
const SUPPORTED_TYPES: u8 = 4u8
Supported CssTypes by the given value type. Read more
source§impl ToComputedValue for TimingFunction
impl ToComputedValue for TimingFunction
§type ComputedValue = TimingFunction<i32, f32, PiecewiseLinearFunction>
type ComputedValue = TimingFunction<i32, f32, PiecewiseLinearFunction>
The computed value type we’re going to be converted to.
source§fn to_computed_value(&self, _: &Context<'_>) -> Self::ComputedValue
fn to_computed_value(&self, _: &Context<'_>) -> Self::ComputedValue
Convert a specified value to a computed value, using itself and the data
inside the
Context
.source§fn from_computed_value(computed: &Self::ComputedValue) -> Self
fn from_computed_value(computed: &Self::ComputedValue) -> Self
Convert a computed value to specified value form. Read more