Struct ChunksExactMut

pub struct ChunksExactMut<'data, T> { /* private fields */ }

Parallel iterator over mutable non-overlapping chunks of a slice

Implementations

impl<'data, T> ChunksExactMut<'data, T>

fn into_remainder(self) -> &'data mut [T]

Return the remainder of the original slice that is not going to be returned by the iterator. The returned slice has at most chunk_size-1 elements.

Note that this has to consume self to return the original lifetime of the data, which prevents this from actually being used as a parallel iterator since that also consumes. This method is provided for parity with std::iter::ChunksExactMut, but consider calling remainder() or take_remainder() as alternatives.

fn remainder(&mut self) -> &mut [T]

Return the remainder of the original slice that is not going to be returned by the iterator. The returned slice has at most chunk_size-1 elements.

Consider take_remainder() if you need access to the data with its original lifetime, rather than borrowing through &mut self here.

fn take_remainder(&mut self) -> &'data mut [T]

Return the remainder of the original slice that is not going to be returned by the iterator. The returned slice has at most chunk_size-1 elements. Subsequent calls will return an empty slice.

Trait Implementations

impl<'data, T: Debug> Debug for ChunksExactMut<'data, T>

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl<'data, T: Send> ParallelIterator for ChunksExactMut<'data, T>

type Item = &'data mut [T];
fn drive_unindexed<C>(self, consumer: C) -> C::Result
where
    C: UnindexedConsumer<Self::Item>,
fn opt_len(&self) -> Option<usize>

impl<T: Send> IndexedParallelIterator for ChunksExactMut<'_, T>

fn drive<C>(self, consumer: C) -> C::Result
where
    C: Consumer<Self::Item>,
fn len(&self) -> usize
fn with_producer<CB>(self, callback: CB) -> CB::Output
where
    CB: ProducerCallback<Self::Item>,

Auto Trait Implementations

impl<'data, T> !UnwindSafe for ChunksExactMut<'data, T>

impl<'data, T> Freeze for ChunksExactMut<'data, T> where &'data mut [T]: Freeze + Freeze,

impl<'data, T> RefUnwindSafe for ChunksExactMut<'data, T> where &'data mut [T]: RefUnwindSafe + RefUnwindSafe,

impl<'data, T> Send for ChunksExactMut<'data, T> where &'data mut [T]: Send + Send,

impl<'data, T> Sync for ChunksExactMut<'data, T> where &'data mut [T]: Sync + Sync,

impl<'data, T> Unpin for ChunksExactMut<'data, T> where &'data mut [T]: Unpin + Unpin,

impl<'data, T> UnsafeUnpin for ChunksExactMut<'data, T> where &'data mut [T]: UnsafeUnpin + UnsafeUnpin,

Blanket Implementations

impl<T> Any for ChunksExactMut<'data, T> where T: 'static + ?Sized,

impl<T> Borrow<T> for ChunksExactMut<'data, T> where T: ?Sized,

impl<T> BorrowMut<T> for ChunksExactMut<'data, T> where T: ?Sized,

impl<T> From<T> for ChunksExactMut<'data, T>

impl<T> IntoEither for ChunksExactMut<'data, T>

impl<T> IntoParallelIterator for ChunksExactMut<'data, T> where T: ParallelIterator,

impl<T> Pointable for ChunksExactMut<'data, T>

impl<T, U> Into<U> for ChunksExactMut<'data, T> where U: From<T>,

impl<T, U> TryFrom<U> for ChunksExactMut<'data, T> where U: Into<T>,

impl<T, U> TryInto<U> for ChunksExactMut<'data, T> where U: TryFrom<T>,