pub struct View<'a, T> {
pub data: &'a [T],
pub offset: isize,
pub strides: &'a [isize],
}Expand description
A strided view of elements: element i (a multi-index) lives at
data[offset + Σ i_k · strides_k].
Fields§
§data: &'a [T]The underlying storage.
offset: isizePosition of the first element, in elements.
strides: &'a [isize]Per-dimension steps, in elements. May be zero (broadcast) or negative.
Trait Implementations§
Auto Trait Implementations§
impl<'a, T> Freeze for View<'a, T>
impl<'a, T> RefUnwindSafe for View<'a, T>where
&'a [T]: RefUnwindSafe,
impl<'a, T> Send for View<'a, T>
impl<'a, T> Sync for View<'a, T>
impl<'a, T> Unpin for View<'a, T>
impl<'a, T> UnsafeUnpin for View<'a, T>where
&'a [T]: UnsafeUnpin,
impl<'a, T> UnwindSafe for View<'a, T>where
&'a [T]: UnwindSafe,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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