Skip to main content

UnflattenEach

Trait UnflattenEach 

Source
pub trait UnflattenEach<T, const K: usize> {
    // Required methods
    fn unflatten_each_ref<const N: usize, const M: usize>(
        &self,
    ) -> &[[[T; N]; M]];
    fn unflatten_each_mut<const N: usize, const M: usize>(
        &mut self,
    ) -> &mut [[[T; N]; M]];
}
Expand description

Unflattening of each element of [[T; K]], see crate-level documentation for examples.

The same conversions are available as free const fns, see unflatten_each_ref() and unflatten_each_mut().

Required Methods§

Source

fn unflatten_each_ref<const N: usize, const M: usize>(&self) -> &[[[T; N]; M]]

Unflatten each element to get &[[[T; N]; M]], where K == N * M

Source

fn unflatten_each_mut<const N: usize, const M: usize>( &mut self, ) -> &mut [[[T; N]; M]]

Unflatten each element to get &mut [[[T; N]; M]], where K == N * M

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T, const K: usize> UnflattenEach<T, K> for [[T; K]]

Source§

fn unflatten_each_ref<const N: usize, const M: usize>(&self) -> &[[[T; N]; M]]

Source§

fn unflatten_each_mut<const N: usize, const M: usize>( &mut self, ) -> &mut [[[T; N]; M]]

Implementors§