pub trait MotionData<const N: usize>:
Copy
+ Debug
+ PartialEq
+ 'static {
// Required methods
fn channels(self) -> [f64; N];
fn with_channels(self, values: [f64; N]) -> Self;
fn compatible(self, other: Self) -> bool;
}Expand description
Fixed numeric representation of a typed animation value. Implementations must
return finite channels and reconstruct drawable values without allocating.
compatible identifies an unchanged property mask; keyframes cannot silently
introduce/remove properties. Implement this for application-owned value types.
Required Methods§
Sourcefn channels(self) -> [f64; N]
fn channels(self) -> [f64; N]
Numeric channels, including unclamped spring presentation where available.
Sourcefn with_channels(self, values: [f64; N]) -> Self
fn with_channels(self, values: [f64; N]) -> Self
Reconstructs a value using this value’s property mask and sampled channels.
Sourcefn compatible(self, other: Self) -> bool
fn compatible(self, other: Self) -> bool
Whether both values declare the same properties.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".