pub struct VectorViewMapMut<V: VectorViewMut<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> { /* private fields */ }
Implementations§
Source§impl<V: VectorViewMut<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> VectorViewMapMut<V, T, U, F_const, F_mut>
impl<V: VectorViewMut<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> VectorViewMapMut<V, T, U, F_const, F_mut>
pub fn new(base: V, mapping_fns: (F_const, F_mut)) -> Self
Trait Implementations§
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>
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>
Source§impl<V: VectorViewMut<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> VectorView<U> for VectorViewMapMut<V, T, U, F_const, F_mut>
impl<V: VectorViewMut<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> VectorView<U> for VectorViewMapMut<V, T, U, F_const, F_mut>
fn at(&self, i: usize) -> &U
fn len(&self) -> usize
Source§unsafe fn at_unchecked<'a>(&self, i: usize) -> &T
unsafe fn at_unchecked<'a>(&self, i: usize) -> &T
Source§fn specialize_sparse<'a, Op: SparseVectorViewOperation<T>>(
&'a self,
_op: Op,
) -> Result<Op::Output<'a>, ()>
fn specialize_sparse<'a, Op: SparseVectorViewOperation<T>>( &'a self, _op: Op, ) -> Result<Op::Output<'a>, ()>
Source§fn as_iter<'a>(&'a self) -> VectorFnIter<VectorViewFn<'a, Self, T>, &'a T> ⓘ
fn as_iter<'a>(&'a self) -> VectorFnIter<VectorViewFn<'a, Self, T>, &'a T> ⓘ
Returns an iterator over all elements in this vector. Read more
Source§fn as_fn<'a>(&'a self) -> VectorViewFn<'a, Self, T>
fn as_fn<'a>(&'a self) -> VectorViewFn<'a, Self, T>
Converts this vector into a
VectorFn
that yields references &T
.Source§fn as_slice<'a>(&'a self) -> Option<&'a [T]>where
T: Sized,
fn as_slice<'a>(&'a self) -> Option<&'a [T]>where
T: Sized,
If the underlying data of this
VectorView
can be represented as a slice,
returns it. Otherwise, None
is returned.Source§fn into_clone_ring_els<R: RingStore>(
self,
ring: R,
) -> CloneElFn<Self, T, CloneRingEl<R>>
fn into_clone_ring_els<R: RingStore>( self, ring: R, ) -> CloneElFn<Self, T, CloneRingEl<R>>
Moves this vector into a
VectorFn
that clones ring elements on access using
the given ring.Source§fn clone_ring_els<'a, R: RingStore>(
&'a self,
ring: R,
) -> CloneElFn<&'a Self, T, CloneRingEl<R>>
fn clone_ring_els<'a, R: RingStore>( &'a self, ring: R, ) -> CloneElFn<&'a Self, T, CloneRingEl<R>>
Converts this vector into a
VectorFn
that clones ring elements on access using
the given ring.Source§fn into_clone_els_by<F>(self, clone_entry: F) -> CloneElFn<Self, T, F>
fn into_clone_els_by<F>(self, clone_entry: F) -> CloneElFn<Self, T, F>
Moves this vector into a
VectorFn
that clones elements on access using
the given function.Source§fn clone_els_by<'a, F>(&'a self, clone_entry: F) -> CloneElFn<&'a Self, T, F>
fn clone_els_by<'a, F>(&'a self, clone_entry: F) -> CloneElFn<&'a Self, T, F>
Converts this vector into a
VectorFn
that clones elements on access using
the given function.Source§fn into_clone_els(self) -> CloneElFn<Self, T, CloneValue>
fn into_clone_els(self) -> CloneElFn<Self, T, CloneValue>
Moves this vector into a
VectorFn
that clones elements on access.Source§fn clone_els<'a>(&'a self) -> CloneElFn<&'a Self, T, CloneValue>
fn clone_els<'a>(&'a self) -> CloneElFn<&'a Self, T, CloneValue>
Converts this vector into a
VectorFn
that clones elements on access.Source§fn into_copy_els(self) -> CloneElFn<Self, T, CloneValue>
fn into_copy_els(self) -> CloneElFn<Self, T, CloneValue>
Moves this vector into a
VectorFn
that copies elements on access.Source§fn copy_els<'a>(&'a self) -> CloneElFn<&'a Self, T, CloneValue>
fn copy_els<'a>(&'a self) -> CloneElFn<&'a Self, T, CloneValue>
Converts this vector into a
VectorFn
that copies elements on access.Source§fn map_view<F: for<'a> Fn(&'a T) -> &'a U, U>(
self,
func: F,
) -> VectorViewMap<Self, T, U, F>where
Self: Sized,
fn map_view<F: for<'a> Fn(&'a T) -> &'a U, U>(
self,
func: F,
) -> VectorViewMap<Self, T, U, F>where
Self: Sized,
Creates a new
VectorView
whose elements are the results of the given function
applied to the elements of this vector. Read moreSource§fn step_by_view(self, step_by: usize) -> StepBy<Self, T>where
Self: Sized,
fn step_by_view(self, step_by: usize) -> StepBy<Self, T>where
Self: Sized,
Called
step_by_view()
to prevent name conflicts with Iterator::step_by()
.Source§impl<V: VectorViewMut<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> VectorViewMut<U> for VectorViewMapMut<V, T, U, F_const, F_mut>
impl<V: VectorViewMut<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> VectorViewMut<U> for VectorViewMapMut<V, T, U, F_const, F_mut>
fn at_mut(&mut self, i: usize) -> &mut U
fn map_mut<F_const: for<'a> Fn(&'a T) -> &'a U, F_mut: for<'a> FnMut(&'a mut T) -> &'a mut U, U>(
self,
map_const: F_const,
map_mut: F_mut,
) -> VectorViewMapMut<Self, T, U, F_const, F_mut>where
Self: Sized,
Source§fn as_slice_mut<'a>(&'a mut self) -> Option<&'a mut [T]>where
T: Sized,
fn as_slice_mut<'a>(&'a mut self) -> Option<&'a mut [T]>where
T: Sized,
If the underlying data of this
VectorView
can be represented as a slice,
returns it. Otherwise, None
is returned.Auto Trait Implementations§
impl<V, T, U, F_const, F_mut> Freeze for VectorViewMapMut<V, T, U, F_const, F_mut>
impl<V, T, U, F_const, F_mut> RefUnwindSafe for VectorViewMapMut<V, T, U, F_const, F_mut>where
V: RefUnwindSafe,
F_const: RefUnwindSafe,
F_mut: RefUnwindSafe,
T: RefUnwindSafe + ?Sized,
U: RefUnwindSafe + ?Sized,
impl<V, T, U, F_const, F_mut> !Send for VectorViewMapMut<V, T, U, F_const, F_mut>
impl<V, T, U, F_const, F_mut> !Sync for VectorViewMapMut<V, T, U, F_const, F_mut>
impl<V, T, U, F_const, F_mut> Unpin for VectorViewMapMut<V, T, U, F_const, F_mut>
impl<V, T, U, F_const, F_mut> UnwindSafe for VectorViewMapMut<V, T, U, F_const, F_mut>where
V: UnwindSafe,
F_const: UnwindSafe,
F_mut: UnwindSafe,
T: RefUnwindSafe + ?Sized,
U: RefUnwindSafe + ?Sized,
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more