pub struct VectorViewFn<'a, V: ?Sized + VectorView<T>, T: ?Sized> { /* private fields */ }
Expand description
Wrapper around VectorView
that interprets it as a VectorFn
. The elements it provides are
just the same references that would be returned through VectorFn::at()
.
Produced by the function VectorView::as_fn()
.
Implementations§
Source§impl<'a, V: ?Sized + VectorView<T>, T: ?Sized> VectorViewFn<'a, V, T>
impl<'a, V: ?Sized + VectorView<T>, T: ?Sized> VectorViewFn<'a, V, T>
Sourcepub fn new(content: &'a V) -> Self
pub fn new(content: &'a V) -> Self
Creates a new VectorViewFn
.
In most circumstances, it is easier to instead use the function VectorView::as_fn()
.
Trait Implementations§
Source§impl<'a, V: ?Sized + VectorView<T>, T: ?Sized> Clone for VectorViewFn<'a, V, T>
impl<'a, V: ?Sized + VectorView<T>, T: ?Sized> Clone for VectorViewFn<'a, V, T>
Source§impl<'a, V: Debug + ?Sized + VectorView<T>, T: Debug + ?Sized> Debug for VectorViewFn<'a, V, T>
impl<'a, V: Debug + ?Sized + VectorView<T>, T: Debug + ?Sized> Debug for VectorViewFn<'a, V, T>
Source§impl<'a, V: ?Sized + VectorView<T>, T: ?Sized> VectorFn<&'a T> for VectorViewFn<'a, V, T>
impl<'a, V: ?Sized + VectorView<T>, T: ?Sized> VectorFn<&'a T> for VectorViewFn<'a, V, T>
impl<'a, V: ?Sized + VectorView<T>, T: ?Sized> Copy for VectorViewFn<'a, V, T>
Auto Trait Implementations§
impl<'a, V, T> Freeze for VectorViewFn<'a, V, T>
impl<'a, V, T> RefUnwindSafe for VectorViewFn<'a, V, T>
impl<'a, V, T> Send for VectorViewFn<'a, V, T>
impl<'a, V, T> Sync for VectorViewFn<'a, V, T>
impl<'a, V, T> Unpin for VectorViewFn<'a, V, T>
impl<'a, V, T> UnwindSafe for VectorViewFn<'a, V, T>
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