Function konst::slice::as_rchunks
source · pub const fn as_rchunks<'a, T, const N: usize>(this: &[T]) -> (&[T], &[[T; N]])
Expand description
Const equivalent of
<[T]>::as_rchunks
§Panics
Panics if N == 0
.
§Example
use konst::slice;
let (rem, arrs) = slice::as_rchunks::<_, 2>(&[2u32, 3, 5, 8, 13, 21, 34]);
assert_eq!(rem, &[2][..]);
assert_eq!(arrs, &[[3, 5], [8, 13], [21, 34]][..]);