struct KeyframeOffsetCacheForProperty {
last_keyframe_that_defined_property: usize,
next_keyframe_that_defines_property: Option<usize>,
}Expand description
Caches the indices of keyframes that declare a specific property.
While traversing the list of keyframes, this is used to avoid repeatedly searching for the next or last keyframe that declares the property. That would result in quadratic runtime with respect to the number of keyframes.
Fields§
§last_keyframe_that_defined_property: usizeThe index of a previous keyframe that declares the property.
Note that if the first keyframe does not declare a property, then it implicitly uses the computed value of that property. That’s why there’s always a preceding keyframe with the property.
next_keyframe_that_defines_property: Option<usize>The index of a future keyframe or None if we have not yet walked the list of keyframes
to find the next index.
There will always be a next keyframe because the last keyframe (like the first keyframe) declares all animating properties.
Trait Implementations§
Source§impl Clone for KeyframeOffsetCacheForProperty
impl Clone for KeyframeOffsetCacheForProperty
Source§fn clone(&self) -> KeyframeOffsetCacheForProperty
fn clone(&self) -> KeyframeOffsetCacheForProperty
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Default for KeyframeOffsetCacheForProperty
impl Default for KeyframeOffsetCacheForProperty
Source§fn default() -> KeyframeOffsetCacheForProperty
fn default() -> KeyframeOffsetCacheForProperty
impl Copy for KeyframeOffsetCacheForProperty
Auto Trait Implementations§
impl Freeze for KeyframeOffsetCacheForProperty
impl RefUnwindSafe for KeyframeOffsetCacheForProperty
impl Send for KeyframeOffsetCacheForProperty
impl Sync for KeyframeOffsetCacheForProperty
impl Unpin for KeyframeOffsetCacheForProperty
impl UnwindSafe for KeyframeOffsetCacheForProperty
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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