pub trait Components<T, const N: usize>: Copy {
// Required methods
fn to_array(self) -> [T; N];
fn from_array(a: [T; N]) -> Self;
}Expand description
Trait for types whose components can be accessed as a fixed-size array.
This is the geometric analogue of ChannelArray in optic-color. It
enables generic componentwise operations (min, max) across different
geometric types.
Required Methods§
Sourcefn from_array(a: [T; N]) -> Self
fn from_array(a: [T; N]) -> Self
Construct from an array of length N.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".