pub trait Flatten<T, const N: usize, const M: usize>: Sized {
// Required methods
fn flatten<const K: usize>(self) -> [T; K];
fn flatten_ref<const K: usize>(&self) -> &[T; K];
fn flatten_mut<const K: usize>(&mut self) -> &mut [T; K];
}Expand description
Reshaping of [[T; N]; M], see crate-level documentation for examples.
The same conversions are available as free const fns, see flatten() and others.
Required Methods§
Sourcefn flatten_ref<const K: usize>(&self) -> &[T; K]
fn flatten_ref<const K: usize>(&self) -> &[T; K]
Flatten into &[T; K], where K == N * M
Sourcefn flatten_mut<const K: usize>(&mut self) -> &mut [T; K]
fn flatten_mut<const K: usize>(&mut self) -> &mut [T; K]
Flatten into &mut [T; K], where K == N * M
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".