pub struct MutProxy<'a, B, V>{ /* 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]
Source§type Vectorizer = WriteVectorizer<'a, A, B, S>
type Vectorizer = WriteVectorizer<'a, A, B, S>
An internal type managing the splitting into vectors. Read more
Source§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
Auto Trait Implementations§
impl<'a, B, V> Freeze for MutProxy<'a, B, V>where
V: Freeze,
impl<'a, B, V> RefUnwindSafe for MutProxy<'a, B, V>where
V: RefUnwindSafe,
B: RefUnwindSafe,
impl<'a, B, V> Send for MutProxy<'a, B, V>
impl<'a, B, V> Sync for MutProxy<'a, B, V>
impl<'a, B, V> Unpin for MutProxy<'a, B, V>where
V: Unpin,
impl<'a, B, V> !UnwindSafe for MutProxy<'a, B, V>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more