pub enum Animated<T> {
Constant {
value: T,
},
Keyframes {
keyframes: Vec<Keyframe<T>>,
},
Data(Box<DataBinding>),
}Expand description
A value that is constant, controlled by sorted keyframes, or following a data set.
Only value types whose AnimatedValue::ACCEPTS_DATA is true (f32, Vec2 and
crate::EffectValue) read or offer the data mode; for the others it fails to
deserialize and the schema leaves it out.
Variants§
Constant
A value without animation.
Fields
§
value: TValue used at every timestamp.
Keyframes
Values evaluated from their keyframe sequence.
Fields
Data(Box<DataBinding>)
A channel of a data set, followed at render time.
Implementations§
Trait Implementations§
Source§impl<'de, T: Deserialize<'de> + AnimatedValue> Deserialize<'de> for Animated<T>
impl<'de, T: Deserialize<'de> + AnimatedValue> Deserialize<'de> for Animated<T>
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl<T: PartialEq> StructuralPartialEq for Animated<T>
Source§impl<T> TimelineValue for Animated<T>
impl<T> TimelineValue for Animated<T>
Source§fn keep_window(&mut self, window: (i64, i64))
fn keep_window(&mut self, window: (i64, i64))
Keeps the keyframes that decide values inside
window (ticks, end exclusive): those
inside it and the nearest one on each side.Source§fn via_clip_mut(&mut self) -> Option<&mut ClipId>
fn via_clip_mut(&mut self) -> Option<&mut ClipId>
Self::via_clip, to point it at another clip.Auto Trait Implementations§
impl<T> Forget for Animated<T>
impl<T> Freeze for Animated<T>
impl<T> Move for Animated<T>
impl<T> RefUnwindSafe for Animated<T>
impl<T> Send for Animated<T>
impl<T> Sync for Animated<T>
impl<T> Unpin for Animated<T>
impl<T> UnsafeUnpin for Animated<T>
impl<T> UnwindSafe for Animated<T>
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