pub trait ArrayConvertible<T, const N: usize> {
// Required methods
fn to_array(&self) -> [T; N];
fn from_array(arr: [T; N]) -> Self;
}
Expand description
Trait for objects that can be converted to/from arrays
Required Methods§
Sourcefn from_array(arr: [T; N]) -> Self
fn from_array(arr: [T; N]) -> Self
Create from array
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.