Skip to main content

UnflattenEach

Trait UnflattenEach 

Source
pub trait UnflattenEach<T, const K: usize> {
    type Unflattened<const N: usize, const M: usize>: ?Sized;

    // Required methods
    fn unflatten_each_ref<const N: usize, const M: usize>(
        &self,
    ) -> &Self::Unflattened<N, M>;
    fn unflatten_each_mut<const N: usize, const M: usize>(
        &mut self,
    ) -> &mut Self::Unflattened<N, M>;
}
Expand description

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

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

Required Associated Types§

Source

type Unflattened<const N: usize, const M: usize>: ?Sized

[[[T; N]; M]] for slices and [[[T; N]; M]; L] for arrays

Required Methods§

Source

fn unflatten_each_ref<const N: usize, const M: usize>( &self, ) -> &Self::Unflattened<N, M>

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

Source

fn unflatten_each_mut<const N: usize, const M: usize>( &mut self, ) -> &mut Self::Unflattened<N, M>

Unflatten each element to get &mut [[[T; N]; M]] or &mut [[[T; N]; M]; L], 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, const L: usize> UnflattenEach<T, K> for [[T; K]; L]

Source§

type Unflattened<const N: usize, const M: usize> = [[[T; N]; M]; L]

Source§

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

Source§

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

Source§

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

Source§

type Unflattened<const N: usize, const M: usize> = [[[T; N]; M]]

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§