Struct slipstream::iterators::MutProxy
source · pub struct MutProxy<'a, B, V>where
V: AsRef<[B]>,
B: Copy,{ /* private fields */ }
Expand description
A proxy object for iterating over mutable slices.
For technical reasons (mostly alignment and padding), it’s not possible to return a simple reference. This type is returned instead and it can be used to both read and write the vectors a slice is turned into.
Note that the data are written in the destructor. Usually, this should not matter, but if you
forget
, the changes will be lost (this is meant as a warning, not as a way to
implement poor-man’s transactions).
Trait Implementations§
source§impl<'a, A: Align, B: Repr, const S: usize> Vectorizable<MutProxy<'a, B, Vector<A, B, S>>> for &'a mut [B]
impl<'a, A: Align, B: Repr, const S: usize> Vectorizable<MutProxy<'a, B, Vector<A, B, S>>> for &'a mut [B]
§type Vectorizer = WriteVectorizer<'a, A, B, S>
type Vectorizer = WriteVectorizer<'a, A, B, S>
An internal type managing the splitting into vectors. Read more
§type Padding = Vector<A, B, S>
type Padding = Vector<A, B, S>
The input type provided by user to fill in the padding/uneven end. Read more
source§fn create(
self,
pad: Option<Vector<A, B, S>>
) -> (Self::Vectorizer, usize, Option<MutProxy<'a, B, Vector<A, B, S>>>)
fn create( self, pad: Option<Vector<A, B, S>> ) -> (Self::Vectorizer, usize, Option<MutProxy<'a, B, Vector<A, B, S>>>)
Internal method to create the vectorizer and kick of the iteration.
source§fn vectorize(self) -> VectorizedIter<Self::Vectorizer, (), V> ⓘ
fn vectorize(self) -> VectorizedIter<Self::Vectorizer, (), V> ⓘ
Vectorize a slice or composite of slices Read more
source§fn vectorize_pad(
self,
pad: Self::Padding
) -> VectorizedIter<Self::Vectorizer, Option<V>, V> ⓘ
fn vectorize_pad( self, pad: Self::Padding ) -> VectorizedIter<Self::Vectorizer, Option<V>, V> ⓘ
Vectorizes a slice or composite of slices, padding the odd end if needed. Read more