Trait calc_common::util::SliceExt
source · pub trait SliceExt {
type Item;
// Required methods
fn uarray_chunks<const SIZE: usize>(
&self
) -> ArrayChunks<'_, Self::Item, SIZE> ⓘ;
fn uarray_chunks_mut<const SIZE: usize>(
&mut self
) -> ArrayChunksMut<'_, Self::Item, SIZE> ⓘ;
}
Required Associated Types§
Required Methods§
sourcefn uarray_chunks<const SIZE: usize>(&self) -> ArrayChunks<'_, Self::Item, SIZE> ⓘ
fn uarray_chunks<const SIZE: usize>(&self) -> ArrayChunks<'_, Self::Item, SIZE> ⓘ
Returns an iterator over N
elements of the slice at a time, starting at the
beginning of the slice.
The chunks are array references and do not overlap. If N
does not divide the
length of the slice, then the last up to N-1
elements will be omitted and can be
retrieved from the remainder
function of the iterator.
Note: this function is designed to be equivalent to the currently unstable core::slice::array_chunks.
sourcefn uarray_chunks_mut<const SIZE: usize>(
&mut self
) -> ArrayChunksMut<'_, Self::Item, SIZE> ⓘ
fn uarray_chunks_mut<const SIZE: usize>( &mut self ) -> ArrayChunksMut<'_, Self::Item, SIZE> ⓘ
Returns an iterator over N
elements of the slice at a time, starting at the
beginning of the slice.
The chunks are mutable array references and do not overlap. If N
does not divide
the length of the slice, then the last up to N-1
elements will be omitted and
can be retrieved from the into_remainder
function of the iterator.
Note: this function is designed to be equivalent to the currently unstable core::slice::array_chunks_mut.