pub struct CloneElFn<V: VectorView<T>, T, F: Fn(&T) -> T> { /* private fields */ }Expand description
A VectorFn that produces its elements by cloning the elements of an underlying VectorView.
Produced by the functions VectorView::clone_els() and VectorView::clone_ring_els().
Implementations§
Source§impl<V: VectorView<T>, T, F: Fn(&T) -> T> CloneElFn<V, T, F>
impl<V: VectorView<T>, T, F: Fn(&T) -> T> CloneElFn<V, T, F>
Sourcepub fn new(content: V, clone_el: F) -> Self
pub fn new(content: V, clone_el: F) -> Self
Creates a new CloneElFn.
In most circumstances, it is easier to instead use the functions VectorView::clone_els()
and VectorView::clone_ring_els() to produce a CloneElFn.
Trait Implementations§
Source§impl<V: Debug + VectorView<T>, T: Debug, F: Debug + Fn(&T) -> T> Debug for CloneElFn<V, T, F>
impl<V: Debug + VectorView<T>, T: Debug, F: Debug + Fn(&T) -> T> Debug for CloneElFn<V, T, F>
Source§impl<V: SelfSubvectorView<T>, T, F: Fn(&T) -> T> SelfSubvectorFn<T> for CloneElFn<V, T, F>
impl<V: SelfSubvectorView<T>, T, F: Fn(&T) -> T> SelfSubvectorFn<T> for CloneElFn<V, T, F>
Source§fn restrict_full(self, range: Range<usize>) -> Self
fn restrict_full(self, range: Range<usize>) -> Self
Returns a
SelfSubvectorFn that represents the elements within the given range
of this vector.Source§fn restrict<R: RangeBounds<usize>>(self, range: R) -> Self
fn restrict<R: RangeBounds<usize>>(self, range: R) -> Self
Returns a
SelfSubvectorFn that represents the elements within the given range
of this vector.Source§impl<V: VectorView<T>, T, F: Fn(&T) -> T> VectorFn<T> for CloneElFn<V, T, F>
impl<V: VectorView<T>, T, F: Fn(&T) -> T> VectorFn<T> for CloneElFn<V, T, F>
impl<V: Copy + VectorView<T>, T, F: Copy + Fn(&T) -> T> Copy for CloneElFn<V, T, F>
Auto Trait Implementations§
impl<V, T, F> Freeze for CloneElFn<V, T, F>
impl<V, T, F> RefUnwindSafe for CloneElFn<V, T, F>
impl<V, T, F> Send for CloneElFn<V, T, F>
impl<V, T, F> Sync for CloneElFn<V, T, F>
impl<V, T, F> Unpin for CloneElFn<V, T, F>
impl<V, T, F> UnwindSafe for CloneElFn<V, T, F>
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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