pub struct TypedSlice<I: IndexType, T> { /* private fields */ }Expand description
A slice wrapper that uses a custom index type.
Implementations§
Source§impl<I: IndexType, T> TypedSlice<I, T>
impl<I: IndexType, T> TypedSlice<I, T>
Sourcepub fn try_from_slice(slice: &[T]) -> Result<&Self, I::IndexTooBigError>
pub fn try_from_slice(slice: &[T]) -> Result<&Self, I::IndexTooBigError>
Tries to create a TypedSlice from a raw slice.
Sourcepub fn try_from_slice_mut(
slice: &mut [T],
) -> Result<&mut Self, I::IndexTooBigError>
pub fn try_from_slice_mut( slice: &mut [T], ) -> Result<&mut Self, I::IndexTooBigError>
Tries to create a mutable TypedSlice from a mutable raw slice.
Sourcepub unsafe fn from_raw_parts<'a>(data: *const T, len: I) -> &'a TypedSlice<I, T>
pub unsafe fn from_raw_parts<'a>(data: *const T, len: I) -> &'a TypedSlice<I, T>
Sourcepub unsafe fn from_raw_parts_mut<'a>(
data: *mut T,
len: I,
) -> &'a mut TypedSlice<I, T>
pub unsafe fn from_raw_parts_mut<'a>( data: *mut T, len: I, ) -> &'a mut TypedSlice<I, T>
Sourcepub const unsafe fn from_slice_unchecked(slice: &[T]) -> &Self
pub const unsafe fn from_slice_unchecked(slice: &[T]) -> &Self
Creates a TypedSlice from a raw slice without checking if its length is in bounds for I.
§Safety
The length of the slice must be less than or equal to I::MAX_RAW_INDEX.
Sourcepub const unsafe fn from_slice_unchecked_mut(slice: &mut [T]) -> &mut Self
pub const unsafe fn from_slice_unchecked_mut(slice: &mut [T]) -> &mut Self
Creates a mutable TypedSlice from a mutable raw slice without checking if its length is in bounds for I.
§Safety
The length of the slice must be less than or equal to I::MAX_RAW_INDEX.
Sourcepub const fn as_mut_slice(&mut self) -> &mut [T]
pub const fn as_mut_slice(&mut self) -> &mut [T]
Returns the TypedSlice as a mutable raw slice reference.
Sourcepub fn cast_index_type<I2: IndexType>(
&self,
) -> Result<&TypedSlice<I2, T>, I2::IndexTooBigError>
pub fn cast_index_type<I2: IndexType>( &self, ) -> Result<&TypedSlice<I2, T>, I2::IndexTooBigError>
Casts the index type of the TypedSlice.
Sourcepub fn cast_index_type_mut<I2: IndexType>(
&mut self,
) -> Result<&mut TypedSlice<I2, T>, I2::IndexTooBigError>
pub fn cast_index_type_mut<I2: IndexType>( &mut self, ) -> Result<&mut TypedSlice<I2, T>, I2::IndexTooBigError>
Casts the index type of the mutable TypedSlice.
pub const fn first(&self) -> Option<&T>
pub const fn first_mut(&mut self) -> Option<&mut T>
pub const fn split_first(&self) -> Option<(&T, &TypedSlice<I, T>)>
pub const fn split_first_mut( &mut self, ) -> Option<(&mut T, &mut TypedSlice<I, T>)>
pub const fn split_last(&self) -> Option<(&T, &TypedSlice<I, T>)>
pub const fn split_last_mut( &mut self, ) -> Option<(&mut T, &mut TypedSlice<I, T>)>
pub const fn last(&self) -> Option<&T>
pub const fn last_mut(&mut self) -> Option<&mut T>
pub const fn first_chunk<const N: usize>(&self) -> Option<&TypedArray<I, T, N>>
pub const fn first_chunk_mut<const N: usize>( &mut self, ) -> Option<&mut TypedArray<I, T, N>>
pub const fn split_first_chunk<const N: usize>( &self, ) -> Option<(&TypedArray<I, T, N>, &TypedSlice<I, T>)>
pub const fn split_first_chunk_mut<const N: usize>( &mut self, ) -> Option<(&mut TypedArray<I, T, N>, &mut TypedSlice<I, T>)>
pub const fn split_last_chunk<const N: usize>( &self, ) -> Option<(&TypedSlice<I, T>, &TypedArray<I, T, N>)>
pub const fn split_last_chunk_mut<const N: usize>( &mut self, ) -> Option<(&mut TypedSlice<I, T>, &mut TypedArray<I, T, N>)>
pub const fn last_chunk<const N: usize>(&self) -> Option<&TypedArray<I, T, N>>
pub const fn last_chunk_mut<const N: usize>( &mut self, ) -> Option<&mut TypedArray<I, T, N>>
pub fn get<X>(&self, index: X) -> Option<&X::Output>where
X: TypedSliceIndex<Self>,
pub fn get_mut<X>(&mut self, index: X) -> Option<&mut X::Output>where
X: TypedSliceIndex<Self>,
Sourcepub unsafe fn get_unchecked<X>(&self, index: X) -> &X::Outputwhere
X: TypedSliceIndex<Self>,
pub unsafe fn get_unchecked<X>(&self, index: X) -> &X::Outputwhere
X: TypedSliceIndex<Self>,
§Safety
The index must be in bounds.
Sourcepub unsafe fn get_unchecked_mut<X>(&mut self, index: X) -> &mut X::Outputwhere
X: TypedSliceIndex<Self>,
pub unsafe fn get_unchecked_mut<X>(&mut self, index: X) -> &mut X::Outputwhere
X: TypedSliceIndex<Self>,
§Safety
The index must be in bounds.
pub const fn as_ptr(&self) -> *const T
pub const fn as_mut_ptr(&mut self) -> *mut T
pub const fn as_ptr_range(&self) -> Range<*const T>
pub const fn as_mut_ptr_range(&mut self) -> Range<*mut T>
pub const fn as_array<const N: usize>(&self) -> Option<&TypedArray<I, T, N>>
pub const fn as_mut_array<const N: usize>( &mut self, ) -> Option<&mut TypedArray<I, T, N>>
pub fn swap(&mut self, a: I, b: I)
pub const fn reverse(&mut self)
pub fn iter(&self) -> Iter<'_, T>
pub fn iter_mut(&mut self) -> IterMut<'_, T>
Sourcepub fn indices(&self) -> TypedRange<I> ⓘ
pub fn indices(&self) -> TypedRange<I> ⓘ
Returns an iterator over the valid indices of this slice.
Sourcepub fn iter_enumerated(&self) -> UncheckedTypedEnumerate<I, Iter<'_, T>> ⓘ
pub fn iter_enumerated(&self) -> UncheckedTypedEnumerate<I, Iter<'_, T>> ⓘ
Returns an iterator over the elements with their indices.
Sourcepub fn iter_mut_enumerated(
&mut self,
) -> UncheckedTypedEnumerate<I, IterMut<'_, T>> ⓘ
pub fn iter_mut_enumerated( &mut self, ) -> UncheckedTypedEnumerate<I, IterMut<'_, T>> ⓘ
Returns an iterator over the elements with their mutable references and indices.
Sourcepub const unsafe fn as_chunks_unchecked<const N: usize>(
&self,
) -> &TypedSlice<I, TypedArray<I, T, N>>
pub const unsafe fn as_chunks_unchecked<const N: usize>( &self, ) -> &TypedSlice<I, TypedArray<I, T, N>>
§Safety
See core::slice::as_chunks_unchecked.
pub const fn as_chunks<const N: usize>( &self, ) -> (&TypedSlice<I, TypedArray<I, T, N>>, &TypedSlice<I, T>)
pub const fn as_rchunks<const N: usize>( &self, ) -> (&TypedSlice<I, T>, &TypedSlice<I, TypedArray<I, T, N>>)
Sourcepub const unsafe fn as_chunks_unchecked_mut<const N: usize>(
&mut self,
) -> &mut TypedSlice<I, TypedArray<I, T, N>>
pub const unsafe fn as_chunks_unchecked_mut<const N: usize>( &mut self, ) -> &mut TypedSlice<I, TypedArray<I, T, N>>
§Safety
See core::slice::as_chunks_unchecked_mut.
pub const fn as_chunks_mut<const N: usize>( &mut self, ) -> (&mut TypedSlice<I, TypedArray<I, T, N>>, &mut TypedSlice<I, T>)
pub const fn as_rchunks_mut<const N: usize>( &mut self, ) -> (&mut TypedSlice<I, T>, &mut TypedSlice<I, TypedArray<I, T, N>>)
Sourcepub unsafe fn split_at_unchecked(
&self,
mid: I,
) -> (&TypedSlice<I, T>, &TypedSlice<I, T>)
pub unsafe fn split_at_unchecked( &self, mid: I, ) -> (&TypedSlice<I, T>, &TypedSlice<I, T>)
§Safety
mid must be in bounds.
Sourcepub unsafe fn split_at_mut_unchecked(
&mut self,
mid: I,
) -> (&mut TypedSlice<I, T>, &mut TypedSlice<I, T>)
pub unsafe fn split_at_mut_unchecked( &mut self, mid: I, ) -> (&mut TypedSlice<I, T>, &mut TypedSlice<I, T>)
§Safety
mid must be in bounds.
pub fn split_at_checked( &self, mid: I, ) -> Option<(&TypedSlice<I, T>, &TypedSlice<I, T>)>
pub fn split_at_mut_checked( &mut self, mid: I, ) -> Option<(&mut TypedSlice<I, T>, &mut TypedSlice<I, T>)>
pub fn splitn<F>( &self, n: usize, pred: F, ) -> Map<SplitN<'_, T, F>, fn(&[T]) -> &TypedSlice<I, T>>
pub fn splitn_mut<F>( &mut self, n: usize, pred: F, ) -> Map<SplitNMut<'_, T, F>, fn(&mut [T]) -> &mut TypedSlice<I, T>>
pub fn rsplitn<F>( &self, n: usize, pred: F, ) -> Map<RSplitN<'_, T, F>, fn(&[T]) -> &TypedSlice<I, T>>
pub fn rsplitn_mut<F>( &mut self, n: usize, pred: F, ) -> Map<RSplitNMut<'_, T, F>, fn(&mut [T]) -> &mut TypedSlice<I, T>>
pub fn contains(&self, x: &T) -> boolwhere
T: PartialEq,
pub fn binary_search(&self, x: &T) -> Result<I, I>where
T: Ord,
pub fn binary_search_by<'a, F>(&'a self, f: F) -> Result<I, I>
pub fn binary_search_by_key<'a, B, F>(&'a self, b: &B, f: F) -> Result<I, I>
pub fn sort_unstable(&mut self)where
T: Ord,
pub fn sort_unstable_by<F>(&mut self, compare: F)
pub fn sort_unstable_by_key<K, F>(&mut self, f: F)
pub fn select_nth_unstable(
&mut self,
index: I,
) -> (&mut TypedSlice<I, T>, &mut T, &mut TypedSlice<I, T>)where
T: Ord,
pub fn select_nth_unstable_by<F>( &mut self, index: I, compare: F, ) -> (&mut TypedSlice<I, T>, &mut T, &mut TypedSlice<I, T>)
pub fn select_nth_unstable_by_key<K, F>( &mut self, index: I, f: F, ) -> (&mut TypedSlice<I, T>, &mut T, &mut TypedSlice<I, T>)
pub fn rotate_left(&mut self, mid: I)
pub fn rotate_right(&mut self, k: I)
pub fn fill(&mut self, value: T)where
T: Clone,
pub fn fill_with<F>(&mut self, f: F)where
F: FnMut() -> T,
pub fn copy_within<R: RangeBounds<I>>(&mut self, src: R, dest: I)where
T: Copy,
pub fn is_sorted(&self) -> boolwhere
T: PartialOrd,
pub fn is_sorted_by<'a, F>(&'a self, compare: F) -> bool
pub fn is_sorted_by_key<'a, F, K>(&'a self, f: F) -> bool
pub fn partition_point<P>(&self, pred: P) -> I
pub fn get_disjoint_mut<X, const N: usize>(
&mut self,
indices: [X; N],
) -> Result<[&mut X::Output; N], GetDisjointMutError>where
X: GetDisjointMutTypedIndex + TypedSliceIndex<Self>,
Sourcepub unsafe fn get_disjoint_unchecked_mut<X, const N: usize>(
&mut self,
indices: [X; N],
) -> [&mut X::Output; N]where
X: TypedSliceIndex<Self>,
pub unsafe fn get_disjoint_unchecked_mut<X, const N: usize>(
&mut self,
indices: [X; N],
) -> [&mut X::Output; N]where
X: TypedSliceIndex<Self>,
§Safety
All indices must be in bounds and non-overlapping.
pub fn windows( &self, size: usize, ) -> Map<Windows<'_, T>, fn(&[T]) -> &TypedSlice<I, T>>
pub fn chunks( &self, size: usize, ) -> Map<Chunks<'_, T>, fn(&[T]) -> &TypedSlice<I, T>>
pub fn chunks_mut( &mut self, size: usize, ) -> Map<ChunksMut<'_, T>, fn(&mut [T]) -> &mut TypedSlice<I, T>>
pub fn rchunks( &self, size: usize, ) -> Map<RChunks<'_, T>, fn(&[T]) -> &TypedSlice<I, T>>
pub fn rchunks_mut( &mut self, size: usize, ) -> Map<RChunksMut<'_, T>, fn(&mut [T]) -> &mut TypedSlice<I, T>>
pub fn split_at(&self, mid: I) -> (&TypedSlice<I, T>, &TypedSlice<I, T>)
pub fn split_at_mut( &mut self, mid: I, ) -> (&mut TypedSlice<I, T>, &mut TypedSlice<I, T>)
pub fn split<F>( &self, pred: F, ) -> Map<Split<'_, T, F>, fn(&[T]) -> &TypedSlice<I, T>>
pub fn split_mut<F>( &mut self, pred: F, ) -> Map<SplitMut<'_, T, F>, fn(&mut [T]) -> &mut TypedSlice<I, T>>
pub fn split_inclusive<F>( &self, pred: F, ) -> Map<SplitInclusive<'_, T, F>, fn(&[T]) -> &TypedSlice<I, T>>
pub fn split_inclusive_mut<F>( &mut self, pred: F, ) -> Map<SplitInclusiveMut<'_, T, F>, fn(&mut [T]) -> &mut TypedSlice<I, T>>
pub fn starts_with(&self, needle: &TypedSlice<I, T>) -> boolwhere
T: PartialEq,
pub fn ends_with(&self, needle: &TypedSlice<I, T>) -> boolwhere
T: PartialEq,
pub fn clone_from_slice(&mut self, src: &TypedSlice<I, T>)where
T: Clone,
pub fn copy_from_slice(&mut self, src: &TypedSlice<I, T>)where
T: Copy,
pub fn swap_with_slice(&mut self, other: &mut TypedSlice<I, T>)
pub fn align_to<U>(&self) -> (&TypedSlice<I, T>, &[U], &TypedSlice<I, T>)
pub fn align_to_mut<U>( &mut self, ) -> (&mut TypedSlice<I, T>, &mut [U], &mut TypedSlice<I, T>)
pub fn chunk_by<F>( &self, pred: F, ) -> Map<ChunkBy<'_, T, F>, fn(&[T]) -> &TypedSlice<I, T>>
pub fn chunk_by_mut<F>( &mut self, pred: F, ) -> Map<ChunkByMut<'_, T, F>, fn(&mut [T]) -> &mut TypedSlice<I, T>>
pub fn chunks_exact( &self, chunk_size: usize, ) -> Map<ChunksExact<'_, T>, fn(&[T]) -> &TypedSlice<I, T>>
pub fn chunks_exact_mut( &mut self, chunk_size: usize, ) -> Map<ChunksExactMut<'_, T>, fn(&mut [T]) -> &mut TypedSlice<I, T>>
pub fn rchunks_exact( &self, chunk_size: usize, ) -> Map<RChunksExact<'_, T>, fn(&[T]) -> &TypedSlice<I, T>>
pub fn rchunks_exact_mut( &mut self, chunk_size: usize, ) -> Map<RChunksExactMut<'_, T>, fn(&mut [T]) -> &mut TypedSlice<I, T>>
pub fn repeat(&self, n: usize) -> Result<TypedVec<I, T>, I::IndexTooBigError>where
T: Copy,
pub fn rsplit_mut<F>( &mut self, pred: F, ) -> Map<RSplitMut<'_, T, F>, fn(&mut [T]) -> &mut TypedSlice<I, T>>
pub fn rsplit<F>( &self, pred: F, ) -> Map<RSplit<'_, T, F>, fn(&[T]) -> &TypedSlice<I, T>>
pub fn sort(&mut self)where
T: Ord,
pub fn sort_by<F>(&mut self, compare: F)
pub fn sort_by_key<K, F>(&mut self, f: F)
pub fn sort_by_cached_key<K, F>(&mut self, f: F)
pub fn split_off_first<'a>(self: &mut &'a Self) -> Option<&'a T>
pub fn split_off_first_mut<'a>(self: &mut &'a mut Self) -> Option<&'a mut T>
pub fn split_off_last<'a>(self: &mut &'a Self) -> Option<&'a T>
pub fn split_off_last_mut<'a>(self: &mut &'a mut Self) -> Option<&'a mut T>
pub fn to_vec(&self) -> TypedVec<I, T>where
T: Clone,
Source§impl<I: IndexType, T, const N: usize> TypedSlice<I, TypedArray<I, T, N>>
impl<I: IndexType, T, const N: usize> TypedSlice<I, TypedArray<I, T, N>>
pub fn as_flattened(&self) -> Result<&TypedSlice<I, T>, I::IndexTooBigError>
pub fn as_flattened_mut( &mut self, ) -> Result<&mut TypedSlice<I, T>, I::IndexTooBigError>
Trait Implementations§
Source§impl<I: IndexType, T, const N: usize> AsMut<TypedSlice<I, T>> for TypedArray<I, T, N>
impl<I: IndexType, T, const N: usize> AsMut<TypedSlice<I, T>> for TypedArray<I, T, N>
Source§fn as_mut(&mut self) -> &mut TypedSlice<I, T>
fn as_mut(&mut self) -> &mut TypedSlice<I, T>
Source§impl<I: IndexType, T, const N: usize> AsMut<TypedSlice<I, T>> for TypedArrayVec<I, T, N>
impl<I: IndexType, T, const N: usize> AsMut<TypedSlice<I, T>> for TypedArrayVec<I, T, N>
Source§fn as_mut(&mut self) -> &mut TypedSlice<I, T>
fn as_mut(&mut self) -> &mut TypedSlice<I, T>
Source§impl<I: IndexType, T> AsMut<TypedSlice<I, T>> for TypedVec<I, T>
impl<I: IndexType, T> AsMut<TypedSlice<I, T>> for TypedVec<I, T>
Source§fn as_mut(&mut self) -> &mut TypedSlice<I, T>
fn as_mut(&mut self) -> &mut TypedSlice<I, T>
Source§impl<I: IndexType, T, const N: usize> AsRef<TypedSlice<I, T>> for TypedArray<I, T, N>
impl<I: IndexType, T, const N: usize> AsRef<TypedSlice<I, T>> for TypedArray<I, T, N>
Source§fn as_ref(&self) -> &TypedSlice<I, T>
fn as_ref(&self) -> &TypedSlice<I, T>
Source§impl<I: IndexType, T, const N: usize> AsRef<TypedSlice<I, T>> for TypedArrayVec<I, T, N>
impl<I: IndexType, T, const N: usize> AsRef<TypedSlice<I, T>> for TypedArrayVec<I, T, N>
Source§fn as_ref(&self) -> &TypedSlice<I, T>
fn as_ref(&self) -> &TypedSlice<I, T>
Source§impl<I: IndexType, T> AsRef<TypedSlice<I, T>> for TypedVec<I, T>
impl<I: IndexType, T> AsRef<TypedSlice<I, T>> for TypedVec<I, T>
Source§fn as_ref(&self) -> &TypedSlice<I, T>
fn as_ref(&self) -> &TypedSlice<I, T>
Source§impl<I: IndexType, T, const N: usize> Borrow<TypedSlice<I, T>> for TypedArray<I, T, N>
impl<I: IndexType, T, const N: usize> Borrow<TypedSlice<I, T>> for TypedArray<I, T, N>
Source§fn borrow(&self) -> &TypedSlice<I, T>
fn borrow(&self) -> &TypedSlice<I, T>
Source§impl<I: IndexType, T, const N: usize> Borrow<TypedSlice<I, T>> for TypedArrayVec<I, T, N>
impl<I: IndexType, T, const N: usize> Borrow<TypedSlice<I, T>> for TypedArrayVec<I, T, N>
Source§fn borrow(&self) -> &TypedSlice<I, T>
fn borrow(&self) -> &TypedSlice<I, T>
Source§impl<I: IndexType, T> Borrow<TypedSlice<I, T>> for TypedVec<I, T>
impl<I: IndexType, T> Borrow<TypedSlice<I, T>> for TypedVec<I, T>
Source§fn borrow(&self) -> &TypedSlice<I, T>
fn borrow(&self) -> &TypedSlice<I, T>
Source§impl<I: IndexType, T, const N: usize> BorrowMut<TypedSlice<I, T>> for TypedArray<I, T, N>
impl<I: IndexType, T, const N: usize> BorrowMut<TypedSlice<I, T>> for TypedArray<I, T, N>
Source§fn borrow_mut(&mut self) -> &mut TypedSlice<I, T>
fn borrow_mut(&mut self) -> &mut TypedSlice<I, T>
Source§impl<I: IndexType, T, const N: usize> BorrowMut<TypedSlice<I, T>> for TypedArrayVec<I, T, N>
impl<I: IndexType, T, const N: usize> BorrowMut<TypedSlice<I, T>> for TypedArrayVec<I, T, N>
Source§fn borrow_mut(&mut self) -> &mut TypedSlice<I, T>
fn borrow_mut(&mut self) -> &mut TypedSlice<I, T>
Source§impl<I: IndexType, T> BorrowMut<TypedSlice<I, T>> for TypedVec<I, T>
impl<I: IndexType, T> BorrowMut<TypedSlice<I, T>> for TypedVec<I, T>
Source§fn borrow_mut(&mut self) -> &mut TypedSlice<I, T>
fn borrow_mut(&mut self) -> &mut TypedSlice<I, T>
Source§impl<'a, I: IndexType, T: Clone> From<&'a TypedSlice<I, T>> for TypedVec<I, T>
impl<'a, I: IndexType, T: Clone> From<&'a TypedSlice<I, T>> for TypedVec<I, T>
Source§fn from(value: &'a TypedSlice<I, T>) -> Self
fn from(value: &'a TypedSlice<I, T>) -> Self
Source§impl<I: IndexType, T, X: TypedSliceIndex<TypedSlice<I, T>>> Index<X> for TypedSlice<I, T>
impl<I: IndexType, T, X: TypedSliceIndex<TypedSlice<I, T>>> Index<X> for TypedSlice<I, T>
Source§impl<I: IndexType, T, X: TypedSliceIndex<TypedSlice<I, T>>> IndexMut<X> for TypedSlice<I, T>
impl<I: IndexType, T, X: TypedSliceIndex<TypedSlice<I, T>>> IndexMut<X> for TypedSlice<I, T>
Source§impl<'a, I: IndexType, T: PartialEq> PartialEq<&'a TypedSlice<I, T>> for TypedVec<I, T>
impl<'a, I: IndexType, T: PartialEq> PartialEq<&'a TypedSlice<I, T>> for TypedVec<I, T>
Source§fn eq(&self, other: &&'a TypedSlice<I, T>) -> bool
fn eq(&self, other: &&'a TypedSlice<I, T>) -> bool
self and other values to be equal, and is used by ==.Source§impl<'a, I: IndexType, T: PartialEq> PartialEq<&'a mut TypedSlice<I, T>> for TypedVec<I, T>
impl<'a, I: IndexType, T: PartialEq> PartialEq<&'a mut TypedSlice<I, T>> for TypedVec<I, T>
Source§fn eq(&self, other: &&'a mut TypedSlice<I, T>) -> bool
fn eq(&self, other: &&'a mut TypedSlice<I, T>) -> bool
self and other values to be equal, and is used by ==.Source§impl<I: IndexType, T: PartialEq> PartialEq<TypedSlice<I, T>> for TypedVec<I, T>
impl<I: IndexType, T: PartialEq> PartialEq<TypedSlice<I, T>> for TypedVec<I, T>
Source§fn eq(&self, other: &TypedSlice<I, T>) -> bool
fn eq(&self, other: &TypedSlice<I, T>) -> bool
self and other values to be equal, and is used by ==.Source§impl<'a, I: IndexType, T, const N: usize> TryFrom<&'a TypedSlice<I, T>> for &'a TypedArray<I, T, N>
impl<'a, I: IndexType, T, const N: usize> TryFrom<&'a TypedSlice<I, T>> for &'a TypedArray<I, T, N>
Source§type Error = TryFromSliceError
type Error = TryFromSliceError
Source§fn try_from(
slice: &'a TypedSlice<I, T>,
) -> Result<&'a TypedArray<I, T, N>, TryFromSliceError>
fn try_from( slice: &'a TypedSlice<I, T>, ) -> Result<&'a TypedArray<I, T, N>, TryFromSliceError>
Source§impl<'a, I: IndexType, T: Copy, const N: usize> TryFrom<&'a TypedSlice<I, T>> for TypedArray<I, T, N>
impl<'a, I: IndexType, T: Copy, const N: usize> TryFrom<&'a TypedSlice<I, T>> for TypedArray<I, T, N>
Source§type Error = TryFromSliceError
type Error = TryFromSliceError
Source§fn try_from(
slice: &'a TypedSlice<I, T>,
) -> Result<TypedArray<I, T, N>, TryFromSliceError>
fn try_from( slice: &'a TypedSlice<I, T>, ) -> Result<TypedArray<I, T, N>, TryFromSliceError>
Source§impl<'a, I: IndexType, T, const N: usize> TryFrom<&'a mut TypedSlice<I, T>> for &'a mut TypedArray<I, T, N>
impl<'a, I: IndexType, T, const N: usize> TryFrom<&'a mut TypedSlice<I, T>> for &'a mut TypedArray<I, T, N>
Source§type Error = TryFromSliceError
type Error = TryFromSliceError
Source§fn try_from(
slice: &'a mut TypedSlice<I, T>,
) -> Result<&'a mut TypedArray<I, T, N>, TryFromSliceError>
fn try_from( slice: &'a mut TypedSlice<I, T>, ) -> Result<&'a mut TypedArray<I, T, N>, TryFromSliceError>
Source§impl<'a, I: IndexType, T: Copy, const N: usize> TryFrom<&'a mut TypedSlice<I, T>> for TypedArray<I, T, N>
impl<'a, I: IndexType, T: Copy, const N: usize> TryFrom<&'a mut TypedSlice<I, T>> for TypedArray<I, T, N>
Source§type Error = TryFromSliceError
type Error = TryFromSliceError
Source§fn try_from(
slice: &'a mut TypedSlice<I, T>,
) -> Result<TypedArray<I, T, N>, TryFromSliceError>
fn try_from( slice: &'a mut TypedSlice<I, T>, ) -> Result<TypedArray<I, T, N>, TryFromSliceError>
Source§impl<I: IndexType, T> TypedSliceIndex<TypedSlice<I, T>> for I
impl<I: IndexType, T> TypedSliceIndex<TypedSlice<I, T>> for I
Source§fn get(self, slice: &TypedSlice<I, T>) -> Option<&Self::Output>
fn get(self, slice: &TypedSlice<I, T>) -> Option<&Self::Output>
None if out of bounds.Source§fn get_mut(self, slice: &mut TypedSlice<I, T>) -> Option<&mut Self::Output>
fn get_mut(self, slice: &mut TypedSlice<I, T>) -> Option<&mut Self::Output>
None if out of bounds.Source§unsafe fn get_unchecked(
self,
slice: *const TypedSlice<I, T>,
) -> *const Self::Output
unsafe fn get_unchecked( self, slice: *const TypedSlice<I, T>, ) -> *const Self::Output
Source§unsafe fn get_unchecked_mut(
self,
slice: *mut TypedSlice<I, T>,
) -> *mut Self::Output
unsafe fn get_unchecked_mut( self, slice: *mut TypedSlice<I, T>, ) -> *mut Self::Output
Source§fn index(self, slice: &TypedSlice<I, T>) -> &Self::Output
fn index(self, slice: &TypedSlice<I, T>) -> &Self::Output
Source§fn index_mut(self, slice: &mut TypedSlice<I, T>) -> &mut Self::Output
fn index_mut(self, slice: &mut TypedSlice<I, T>) -> &mut Self::Output
Source§impl<I: IndexType, T> TypedSliceIndex<TypedSlice<I, T>> for Range<I>
impl<I: IndexType, T> TypedSliceIndex<TypedSlice<I, T>> for Range<I>
Source§type Output = TypedSlice<I, T>
type Output = TypedSlice<I, T>
Source§fn get(self, slice: &TypedSlice<I, T>) -> Option<&Self::Output>
fn get(self, slice: &TypedSlice<I, T>) -> Option<&Self::Output>
None if out of bounds.Source§fn get_mut(self, slice: &mut TypedSlice<I, T>) -> Option<&mut Self::Output>
fn get_mut(self, slice: &mut TypedSlice<I, T>) -> Option<&mut Self::Output>
None if out of bounds.Source§unsafe fn get_unchecked(
self,
slice: *const TypedSlice<I, T>,
) -> *const Self::Output
unsafe fn get_unchecked( self, slice: *const TypedSlice<I, T>, ) -> *const Self::Output
Source§unsafe fn get_unchecked_mut(
self,
slice: *mut TypedSlice<I, T>,
) -> *mut Self::Output
unsafe fn get_unchecked_mut( self, slice: *mut TypedSlice<I, T>, ) -> *mut Self::Output
Source§fn index(self, slice: &TypedSlice<I, T>) -> &Self::Output
fn index(self, slice: &TypedSlice<I, T>) -> &Self::Output
Source§fn index_mut(self, slice: &mut TypedSlice<I, T>) -> &mut Self::Output
fn index_mut(self, slice: &mut TypedSlice<I, T>) -> &mut Self::Output
Source§impl<I: IndexType, T> TypedSliceIndex<TypedSlice<I, T>> for RangeFrom<I>
impl<I: IndexType, T> TypedSliceIndex<TypedSlice<I, T>> for RangeFrom<I>
Source§type Output = TypedSlice<I, T>
type Output = TypedSlice<I, T>
Source§fn get(self, slice: &TypedSlice<I, T>) -> Option<&TypedSlice<I, T>>
fn get(self, slice: &TypedSlice<I, T>) -> Option<&TypedSlice<I, T>>
None if out of bounds.Source§fn get_mut(self, slice: &mut TypedSlice<I, T>) -> Option<&mut TypedSlice<I, T>>
fn get_mut(self, slice: &mut TypedSlice<I, T>) -> Option<&mut TypedSlice<I, T>>
None if out of bounds.Source§unsafe fn get_unchecked(
self,
slice: *const TypedSlice<I, T>,
) -> *const TypedSlice<I, T>
unsafe fn get_unchecked( self, slice: *const TypedSlice<I, T>, ) -> *const TypedSlice<I, T>
Source§unsafe fn get_unchecked_mut(
self,
slice: *mut TypedSlice<I, T>,
) -> *mut TypedSlice<I, T>
unsafe fn get_unchecked_mut( self, slice: *mut TypedSlice<I, T>, ) -> *mut TypedSlice<I, T>
Source§fn index(self, slice: &TypedSlice<I, T>) -> &TypedSlice<I, T>
fn index(self, slice: &TypedSlice<I, T>) -> &TypedSlice<I, T>
Source§fn index_mut(self, slice: &mut TypedSlice<I, T>) -> &mut TypedSlice<I, T>
fn index_mut(self, slice: &mut TypedSlice<I, T>) -> &mut TypedSlice<I, T>
Source§impl<I: IndexType, T> TypedSliceIndex<TypedSlice<I, T>> for RangeFull
impl<I: IndexType, T> TypedSliceIndex<TypedSlice<I, T>> for RangeFull
Source§type Output = TypedSlice<I, T>
type Output = TypedSlice<I, T>
Source§fn get(self, slice: &TypedSlice<I, T>) -> Option<&TypedSlice<I, T>>
fn get(self, slice: &TypedSlice<I, T>) -> Option<&TypedSlice<I, T>>
None if out of bounds.Source§fn get_mut(self, slice: &mut TypedSlice<I, T>) -> Option<&mut TypedSlice<I, T>>
fn get_mut(self, slice: &mut TypedSlice<I, T>) -> Option<&mut TypedSlice<I, T>>
None if out of bounds.Source§unsafe fn get_unchecked(
self,
slice: *const TypedSlice<I, T>,
) -> *const TypedSlice<I, T>
unsafe fn get_unchecked( self, slice: *const TypedSlice<I, T>, ) -> *const TypedSlice<I, T>
Source§unsafe fn get_unchecked_mut(
self,
slice: *mut TypedSlice<I, T>,
) -> *mut TypedSlice<I, T>
unsafe fn get_unchecked_mut( self, slice: *mut TypedSlice<I, T>, ) -> *mut TypedSlice<I, T>
Source§fn index(self, slice: &TypedSlice<I, T>) -> &TypedSlice<I, T>
fn index(self, slice: &TypedSlice<I, T>) -> &TypedSlice<I, T>
Source§fn index_mut(self, slice: &mut TypedSlice<I, T>) -> &mut TypedSlice<I, T>
fn index_mut(self, slice: &mut TypedSlice<I, T>) -> &mut TypedSlice<I, T>
Source§impl<I: IndexType, T> TypedSliceIndex<TypedSlice<I, T>> for RangeInclusive<I>
impl<I: IndexType, T> TypedSliceIndex<TypedSlice<I, T>> for RangeInclusive<I>
Source§type Output = TypedSlice<I, T>
type Output = TypedSlice<I, T>
Source§fn get(self, slice: &TypedSlice<I, T>) -> Option<&Self::Output>
fn get(self, slice: &TypedSlice<I, T>) -> Option<&Self::Output>
None if out of bounds.Source§fn get_mut(self, slice: &mut TypedSlice<I, T>) -> Option<&mut Self::Output>
fn get_mut(self, slice: &mut TypedSlice<I, T>) -> Option<&mut Self::Output>
None if out of bounds.Source§unsafe fn get_unchecked(
self,
slice: *const TypedSlice<I, T>,
) -> *const Self::Output
unsafe fn get_unchecked( self, slice: *const TypedSlice<I, T>, ) -> *const Self::Output
Source§unsafe fn get_unchecked_mut(
self,
slice: *mut TypedSlice<I, T>,
) -> *mut Self::Output
unsafe fn get_unchecked_mut( self, slice: *mut TypedSlice<I, T>, ) -> *mut Self::Output
Source§fn index(self, slice: &TypedSlice<I, T>) -> &Self::Output
fn index(self, slice: &TypedSlice<I, T>) -> &Self::Output
Source§fn index_mut(self, slice: &mut TypedSlice<I, T>) -> &mut Self::Output
fn index_mut(self, slice: &mut TypedSlice<I, T>) -> &mut Self::Output
Source§impl<I: IndexType, T> TypedSliceIndex<TypedSlice<I, T>> for RangeTo<I>
impl<I: IndexType, T> TypedSliceIndex<TypedSlice<I, T>> for RangeTo<I>
Source§type Output = TypedSlice<I, T>
type Output = TypedSlice<I, T>
Source§fn get(self, slice: &TypedSlice<I, T>) -> Option<&TypedSlice<I, T>>
fn get(self, slice: &TypedSlice<I, T>) -> Option<&TypedSlice<I, T>>
None if out of bounds.Source§fn get_mut(self, slice: &mut TypedSlice<I, T>) -> Option<&mut TypedSlice<I, T>>
fn get_mut(self, slice: &mut TypedSlice<I, T>) -> Option<&mut TypedSlice<I, T>>
None if out of bounds.Source§unsafe fn get_unchecked(
self,
slice: *const TypedSlice<I, T>,
) -> *const TypedSlice<I, T>
unsafe fn get_unchecked( self, slice: *const TypedSlice<I, T>, ) -> *const TypedSlice<I, T>
Source§unsafe fn get_unchecked_mut(
self,
slice: *mut TypedSlice<I, T>,
) -> *mut TypedSlice<I, T>
unsafe fn get_unchecked_mut( self, slice: *mut TypedSlice<I, T>, ) -> *mut TypedSlice<I, T>
Source§fn index(self, slice: &TypedSlice<I, T>) -> &TypedSlice<I, T>
fn index(self, slice: &TypedSlice<I, T>) -> &TypedSlice<I, T>
Source§fn index_mut(self, slice: &mut TypedSlice<I, T>) -> &mut TypedSlice<I, T>
fn index_mut(self, slice: &mut TypedSlice<I, T>) -> &mut TypedSlice<I, T>
Source§impl<I: IndexType, T> TypedSliceIndex<TypedSlice<I, T>> for RangeToInclusive<I>
impl<I: IndexType, T> TypedSliceIndex<TypedSlice<I, T>> for RangeToInclusive<I>
Source§type Output = TypedSlice<I, T>
type Output = TypedSlice<I, T>
Source§fn get(self, slice: &TypedSlice<I, T>) -> Option<&TypedSlice<I, T>>
fn get(self, slice: &TypedSlice<I, T>) -> Option<&TypedSlice<I, T>>
None if out of bounds.Source§fn get_mut(self, slice: &mut TypedSlice<I, T>) -> Option<&mut TypedSlice<I, T>>
fn get_mut(self, slice: &mut TypedSlice<I, T>) -> Option<&mut TypedSlice<I, T>>
None if out of bounds.