pub trait Animatable:
Copy
+ Debug
+ PartialEq {
const N: usize;
// Required methods
fn lerp(a: Self, b: Self, k: f64) -> Self;
fn component(self, i: usize) -> f64;
fn from_fn(f: impl FnMut(usize) -> f64) -> Self;
// Provided method
fn from_json(v: &Value) -> Option<Self> { ... }
}Expand description
A value that can be keyframed: f64, [f64; N] (vectors, colours).
Required Associated Constants§
Required Methods§
fn lerp(a: Self, b: Self, k: f64) -> Self
fn component(self, i: usize) -> f64
fn from_fn(f: impl FnMut(usize) -> f64) -> Self
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".