Struct flatcontainer::impls::slice::ReadSlice
source · pub struct ReadSlice<'a, R: Region, O: OffsetContainer<R::Index> = Vec<<R as Region>::Index>>(/* private fields */);
Expand description
A helper to read data out of a slice region.
Implementations§
source§impl<R: Region, O: OffsetContainer<R::Index>> ReadSlice<'_, R, O>
impl<R: Region, O: OffsetContainer<R::Index>> ReadSlice<'_, R, O>
sourcepub fn get(&self, index: usize) -> R::ReadItem<'_>
pub fn get(&self, index: usize) -> R::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) -> <Self as IntoIterator>::IntoIter
pub fn iter(&self) -> <Self as IntoIterator>::IntoIter
Returns an iterator over all contained items.
Trait Implementations§
source§impl<'a, R: Region, O: OffsetContainer<R::Index>> IntoIterator for ReadSlice<'a, R, O>
impl<'a, R: Region, O: OffsetContainer<R::Index>> IntoIterator for ReadSlice<'a, R, O>
source§impl<'a, R, O> IntoOwned<'a> for ReadSlice<'a, R, O>
impl<'a, R, O> IntoOwned<'a> for ReadSlice<'a, R, O>
source§fn into_owned(self) -> Self::Owned
fn into_owned(self) -> Self::Owned
Conversion from an instance of this type to the owned type.
source§fn clone_onto(self, other: &mut Self::Owned)
fn clone_onto(self, other: &mut Self::Owned)
Clones
self
onto an existing instance of the owned type.source§impl<R: Region, O: OffsetContainer<R::Index>> Ord for ReadSlice<'_, R, O>
impl<R: Region, O: OffsetContainer<R::Index>> Ord for ReadSlice<'_, R, O>
source§impl<R: Region, O: OffsetContainer<R::Index>> PartialOrd for ReadSlice<'_, R, O>where
for<'a> R::ReadItem<'a>: PartialOrd,
impl<R: Region, O: OffsetContainer<R::Index>> PartialOrd for ReadSlice<'_, R, O>where
for<'a> R::ReadItem<'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>
impl<'a, R, O> ReserveItems<ReadSlice<'a, R, O>> for SliceRegion<R, O>
impl<R: Region, O: OffsetContainer<R::Index>> Copy for ReadSlice<'_, R, O>
impl<R: Region, O: OffsetContainer<R::Index>> 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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)