Skip to main content

RechunkEach

Trait RechunkEach 

Source
pub trait RechunkEach<T, const N: usize, const M: usize> {
    // Required methods
    fn rechunk_each_ref<const C: usize, const D: usize>(&self) -> &[[[T; C]; D]];
    fn rechunk_each_mut<const C: usize, const D: usize>(
        &mut self,
    ) -> &mut [[[T; C]; D]];
}
Expand description

Changing chunk size of each element of [[[T; N]; M]], see crate-level documentation for examples.

The same conversions are available as free const fns, see rechunk_each_ref() and rechunk_each_mut().

Required Methods§

Source

fn rechunk_each_ref<const C: usize, const D: usize>(&self) -> &[[[T; C]; D]]

Change chunk size of each element to get &[[[T; C]; D]], where N * M == C * D

Source

fn rechunk_each_mut<const C: usize, const D: usize>( &mut self, ) -> &mut [[[T; C]; D]]

Change chunk size of each element to get &mut [[[T; C]; D]], where N * M == C * D

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 N: usize, const M: usize> RechunkEach<T, N, M> for [[[T; N]; M]]

Source§

fn rechunk_each_ref<const C: usize, const D: usize>(&self) -> &[[[T; C]; D]]

Source§

fn rechunk_each_mut<const C: usize, const D: usize>( &mut self, ) -> &mut [[[T; C]; D]]

Implementors§