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, B, V> Debug for MutProxy<'a, B, V>where V: AsRef<[B]> + Debug, B: Copy + Debug,

source§

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

Formats the value using the given formatter. Read more
source§

impl<B, V> Deref for MutProxy<'_, B, V>where V: AsRef<[B]>, B: Copy,

§

type Target = V

The resulting type after dereferencing.
source§

fn deref(&self) -> &V

Dereferences the value.
source§

impl<B, V> DerefMut for MutProxy<'_, B, V>where V: AsRef<[B]>, B: Copy,

source§

fn deref_mut(&mut self) -> &mut V

Mutably dereferences the value.
source§

impl<B, V> Drop for MutProxy<'_, B, V>where V: AsRef<[B]>, B: Copy,

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

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>

An internal type managing the splitting into vectors. Read more
§

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>>>)

Internal method to create the vectorizer and kick of the iteration.
source§

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>

Vectorizes a slice or composite of slices, padding the odd end if needed. Read more

Auto Trait Implementations§

§

impl<'a, B, V> RefUnwindSafe for MutProxy<'a, B, V>where B: RefUnwindSafe, V: RefUnwindSafe,

§

impl<'a, B, V> Send for MutProxy<'a, B, V>where B: Send, V: Send,

§

impl<'a, B, V> Sync for MutProxy<'a, B, V>where B: Sync, V: Sync,

§

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> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.