pub struct ReadSlice<'a, R, O = Vec<<R as Region>::Index>>(/* private fields */)
where
R: Region,
O: OffsetContainer<<R as Region>::Index>;
Expand description
A helper to read data out of a slice region.
Implementations§
Source§impl<R, O> ReadSlice<'_, R, O>
impl<R, O> ReadSlice<'_, R, O>
Sourcepub fn get(&self, index: usize) -> <R as Region>::ReadItem<'_>
pub fn get(&self, index: usize) -> <R as Region>::ReadItem<'_>
Read the n-th item from the underlying region.
§Panics
Panics if the index is out of bounds, i.e., it is larger than the length of this slice representation.
Sourcepub fn iter(&self) -> <ReadSlice<'_, R, O> as IntoIterator>::IntoIter
pub fn iter(&self) -> <ReadSlice<'_, R, O> as IntoIterator>::IntoIter
Returns an iterator over all contained items.
Trait Implementations§
Source§impl<'a, R, O> IntoIterator for ReadSlice<'a, R, O>
impl<'a, R, O> IntoIterator for ReadSlice<'a, R, O>
Source§type IntoIter = ReadSliceIter<'a, R, O>
type IntoIter = ReadSliceIter<'a, R, O>
Which kind of iterator are we turning this into?
Source§impl<'a, R, O> IntoOwned<'a> for ReadSlice<'a, R, O>
impl<'a, R, O> IntoOwned<'a> for ReadSlice<'a, R, O>
Source§impl<R, O> Ord for ReadSlice<'_, R, O>
impl<R, O> Ord for ReadSlice<'_, R, O>
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<R, O> PartialOrd for ReadSlice<'_, R, O>where
R: Region,
O: OffsetContainer<<R as Region>::Index>,
<R as Region>::ReadItem<'a>: for<'a> PartialOrd,
impl<R, O> PartialOrd for ReadSlice<'_, R, O>where
R: Region,
O: OffsetContainer<<R as Region>::Index>,
<R as Region>::ReadItem<'a>: for<'a> PartialOrd,
Source§impl<'a, C, O> Push<ReadSlice<'a, C, O>> for SliceRegion<C, O>
impl<'a, C, O> Push<ReadSlice<'a, C, O>> for SliceRegion<C, O>
Source§impl<'a, R, O> ReserveItems<ReadSlice<'a, R, O>> for SliceRegion<R, O>where
R: Region + ReserveItems<<R as Region>::ReadItem<'a>> + 'a,
O: OffsetContainer<<R as Region>::Index>,
impl<'a, R, O> ReserveItems<ReadSlice<'a, R, O>> for SliceRegion<R, O>where
R: Region + ReserveItems<<R as Region>::ReadItem<'a>> + 'a,
O: OffsetContainer<<R as Region>::Index>,
impl<R, O> Copy for ReadSlice<'_, R, O>
impl<R, O> Eq for ReadSlice<'_, R, O>
Auto Trait Implementations§
impl<'a, R, O> Freeze for ReadSlice<'a, R, O>
impl<'a, R, O> RefUnwindSafe for ReadSlice<'a, R, O>
impl<'a, R, O> Send for ReadSlice<'a, R, O>
impl<'a, R, O> Sync for ReadSlice<'a, R, O>
impl<'a, R, O> Unpin for ReadSlice<'a, R, O>
impl<'a, R, O> UnwindSafe for ReadSlice<'a, R, O>
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