Struct style::animation::IntermediateComputedKeyframe
source · struct IntermediateComputedKeyframe {
declarations: PropertyDeclarationBlock,
timing_function: Option<TimingFunction>,
start_percentage: f32,
}
Expand description
A temporary data structure used when calculating ComputedKeyframes for an
animation. This data structure is used to collapse information for steps
which may be spread across multiple keyframe declarations into a single
instance per start_percentage
.
Fields§
§declarations: PropertyDeclarationBlock
§timing_function: Option<TimingFunction>
§start_percentage: f32
Implementations§
source§impl IntermediateComputedKeyframe
impl IntermediateComputedKeyframe
fn new(start_percentage: f32) -> Self
sourcefn generate_for_keyframes(
animation: &KeyframesAnimation,
context: &SharedStyleContext<'_>,
base_style: &ComputedValues,
) -> Vec<Self>
fn generate_for_keyframes( animation: &KeyframesAnimation, context: &SharedStyleContext<'_>, base_style: &ComputedValues, ) -> Vec<Self>
Walk through all keyframe declarations and combine all declarations with the
same start_percentage
into individual IntermediateComputedKeyframe
s.
fn update_from_step( &mut self, step: &KeyframesStep, context: &SharedStyleContext<'_>, base_style: &ComputedValues, )
fn resolve_style<E>(
self,
element: E,
context: &SharedStyleContext<'_>,
base_style: &Arc<ComputedValues>,
resolver: &mut StyleResolverForElement<'_, '_, '_, E>,
) -> Arc<ComputedValues>where
E: TElement,
Auto Trait Implementations§
impl Freeze for IntermediateComputedKeyframe
impl RefUnwindSafe for IntermediateComputedKeyframe
impl Send for IntermediateComputedKeyframe
impl Sync for IntermediateComputedKeyframe
impl Unpin for IntermediateComputedKeyframe
impl UnwindSafe for IntermediateComputedKeyframe
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> 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