Trait feanor_math::seq::SwappableVectorViewMut

source ·
pub trait SwappableVectorViewMut<T: ?Sized>: VectorViewMut<T> {
    // Required method
    fn swap(&mut self, i: usize, j: usize);
}
Expand description

A trait for VectorViewMuts that support swapping of two elements.

Since VectorViewMut is not necessarily able to return two mutable references to different entries, supporting swapping is indeed a stronger property than just being a VectorViewMut.

Required Methods§

source

fn swap(&mut self, i: usize, j: usize)

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<'a, T: ?Sized, V: ?Sized + SwappableVectorViewMut<T>> SwappableVectorViewMut<T> for &'a mut V

source§

fn swap(&mut self, i: usize, j: usize)

source§

impl<T> SwappableVectorViewMut<T> for [T]

source§

fn swap(&mut self, i: usize, j: usize)

source§

impl<T> SwappableVectorViewMut<T> for Vec<T>

source§

fn swap(&mut self, i: usize, j: usize)

source§

impl<T, const N: usize> SwappableVectorViewMut<T> for [T; N]

source§

fn swap(&mut self, i: usize, j: usize)

Implementors§

source§

impl<'a, V, T> SwappableVectorViewMut<T> for ColumnMut<'a, V, T>
where V: AsPointerToSlice<T>,

source§

impl<V: SwappableVectorViewMut<T>, T: ?Sized> SwappableVectorViewMut<T> for StepBy<V, T>

source§

impl<V: SwappableVectorViewMut<T>, T: ?Sized> SwappableVectorViewMut<T> for SubvectorView<V, T>

source§

impl<V: SwappableVectorViewMut<T>, T: ?Sized, U: ?Sized, F_const: for<'a> Fn(&'a T) -> &'a U, F_mut: for<'a> FnMut(&'a mut T) -> &'a mut U> SwappableVectorViewMut<U> for VectorViewMapMut<V, T, U, F_const, F_mut>