Trait Chunked

Source
pub trait Chunked<T, const N: usize> {
    // Required method
    const fn chunked<const C: usize>(self) -> [[T; C]; { _ }]
       where [(); { _ }]:;
}
Expand description

🍪

Required Methods§

Source

const fn chunked<const C: usize>(self) -> [[T; C]; { _ }]
where [(); { _ }]:,

Chunks. This will compile fail if N ∤ (does not divide) C

assert_eq!(range::<6>().chunked::<3>(), [[0, 1, 2], [3, 4, 5]]);

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.

Implementations on Foreign Types§

Source§

impl<const N: usize, T> Chunked<T, N> for [T; N]

Source§

const fn chunked<const C: usize>(self) -> [[T; C]; { _ }]
where [(); { _ }]:,

Implementors§