pub struct IndexSlice<I, T> { /* private fields */ }Implementations§
Source§impl<I, T> IndexSlice<I, T>where
I: IndexingType,
impl<I, T> IndexSlice<I, T>where
I: IndexingType,
pub fn iter_enumerated( &self, initial_offset: I, ) -> IndexIterEnumerated<I, Iter<'_, T>> ⓘ
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn first(&self) -> Option<&T>
pub fn first_mut(&mut self) -> Option<&mut T>
pub fn last(&self) -> Option<&T>
pub fn last_mut(&mut self) -> Option<&mut T>
pub fn as_slice(&self) -> &[T]
pub fn as_slice_mut(&mut self) -> &mut [T]
pub fn from_boxed_slice(slice_box: Box<[T]>) -> Box<IndexSlice<I, T>>
pub fn next_idx(&self) -> I
pub fn last_idx(&self) -> Option<I>
pub fn get(&self, idx: I) -> Option<&T>
pub fn get_mut(&mut self, idx: I) -> Option<&mut T>
pub fn iter(&self) -> Iter<'_, T>
pub fn iter_mut(&mut self) -> IterMut<'_, T>
pub fn two_distinct_mut(&mut self, a: I, b: I) -> (&mut T, &mut T)
pub fn multi_ref_mut_handout<const CAP: usize>( &mut self, ) -> MultiRefMutHandout<'_, I, T, CAP>
pub fn ref_handout_stack(&mut self) -> RefHandoutStackBase<'_, I, T>
pub fn split_at_mut( &mut self, idx: I, ) -> (&mut IndexSlice<I, T>, &mut IndexSlice<I, T>)
Trait Implementations§
Source§impl<I, T> Debug for IndexSlice<I, T>where
I: IndexingType,
T: Debug,
impl<I, T> Debug for IndexSlice<I, T>where
I: IndexingType,
T: Debug,
Source§impl<I, T> Hash for IndexSlice<I, T>
impl<I, T> Hash for IndexSlice<I, T>
Source§impl<I, T> Index<I> for IndexSlice<I, T>where
I: IndexingType,
impl<I, T> Index<I> for IndexSlice<I, T>where
I: IndexingType,
Source§impl<I, T> Index<Range<I>> for IndexSlice<I, T>where
I: IndexingType,
impl<I, T> Index<Range<I>> for IndexSlice<I, T>where
I: IndexingType,
Source§impl<I, T> Index<RangeFrom<I>> for IndexSlice<I, T>where
I: IndexingType,
impl<I, T> Index<RangeFrom<I>> for IndexSlice<I, T>where
I: IndexingType,
Source§impl<I, T> Index<RangeInclusive<I>> for IndexSlice<I, T>where
I: IndexingType,
impl<I, T> Index<RangeInclusive<I>> for IndexSlice<I, T>where
I: IndexingType,
Source§type Output = IndexSlice<I, T>
type Output = IndexSlice<I, T>
The returned type after indexing.
Source§fn index(
&self,
rb: RangeInclusive<I>,
) -> &<IndexSlice<I, T> as Index<RangeInclusive<I>>>::Output
fn index( &self, rb: RangeInclusive<I>, ) -> &<IndexSlice<I, T> as Index<RangeInclusive<I>>>::Output
Performs the indexing (
container[index]) operation. Read moreSource§impl<I, T> Index<RangeTo<I>> for IndexSlice<I, T>where
I: IndexingType,
impl<I, T> Index<RangeTo<I>> for IndexSlice<I, T>where
I: IndexingType,
Source§impl<I, T> Index<RangeToInclusive<I>> for IndexSlice<I, T>where
I: IndexingType,
impl<I, T> Index<RangeToInclusive<I>> for IndexSlice<I, T>where
I: IndexingType,
Source§type Output = IndexSlice<I, T>
type Output = IndexSlice<I, T>
The returned type after indexing.
Source§fn index(
&self,
rb: RangeToInclusive<I>,
) -> &<IndexSlice<I, T> as Index<RangeToInclusive<I>>>::Output
fn index( &self, rb: RangeToInclusive<I>, ) -> &<IndexSlice<I, T> as Index<RangeToInclusive<I>>>::Output
Performs the indexing (
container[index]) operation. Read moreSource§impl<I, T> IndexMut<I> for IndexSlice<I, T>where
I: IndexingType,
impl<I, T> IndexMut<I> for IndexSlice<I, T>where
I: IndexingType,
Source§impl<I, T> IndexMut<Range<I>> for IndexSlice<I, T>where
I: IndexingType,
impl<I, T> IndexMut<Range<I>> for IndexSlice<I, T>where
I: IndexingType,
Source§impl<I, T> IndexMut<RangeFrom<I>> for IndexSlice<I, T>where
I: IndexingType,
impl<I, T> IndexMut<RangeFrom<I>> for IndexSlice<I, T>where
I: IndexingType,
Source§impl<I, T> IndexMut<RangeInclusive<I>> for IndexSlice<I, T>where
I: IndexingType,
impl<I, T> IndexMut<RangeInclusive<I>> for IndexSlice<I, T>where
I: IndexingType,
Source§fn index_mut(
&mut self,
rb: RangeInclusive<I>,
) -> &mut <IndexSlice<I, T> as Index<RangeInclusive<I>>>::Output
fn index_mut( &mut self, rb: RangeInclusive<I>, ) -> &mut <IndexSlice<I, T> as Index<RangeInclusive<I>>>::Output
Performs the mutable indexing (
container[index]) operation. Read moreSource§impl<I, T> IndexMut<RangeTo<I>> for IndexSlice<I, T>where
I: IndexingType,
impl<I, T> IndexMut<RangeTo<I>> for IndexSlice<I, T>where
I: IndexingType,
Source§impl<I, T> IndexMut<RangeToInclusive<I>> for IndexSlice<I, T>where
I: IndexingType,
impl<I, T> IndexMut<RangeToInclusive<I>> for IndexSlice<I, T>where
I: IndexingType,
Source§fn index_mut(
&mut self,
rb: RangeToInclusive<I>,
) -> &mut <IndexSlice<I, T> as Index<RangeToInclusive<I>>>::Output
fn index_mut( &mut self, rb: RangeToInclusive<I>, ) -> &mut <IndexSlice<I, T> as Index<RangeToInclusive<I>>>::Output
Performs the mutable indexing (
container[index]) operation. Read moreSource§impl<'a, I, T> IntoIterator for &'a IndexSlice<I, T>where
I: IndexingType,
impl<'a, I, T> IntoIterator for &'a IndexSlice<I, T>where
I: IndexingType,
Source§impl<'a, I, T> IntoIterator for &'a mut IndexSlice<I, T>where
I: IndexingType,
impl<'a, I, T> IntoIterator for &'a mut IndexSlice<I, T>where
I: IndexingType,
Source§impl<I, T> Ord for IndexSlice<I, T>
impl<I, T> Ord for IndexSlice<I, T>
Source§impl<I, T> PartialEq<[T]> for IndexSlice<I, T>where
I: IndexingType,
T: PartialEq,
impl<I, T> PartialEq<[T]> for IndexSlice<I, T>where
I: IndexingType,
T: PartialEq,
Source§impl<I, T, const N: usize> PartialEq<[T; N]> for IndexSlice<I, T>where
I: IndexingType,
T: PartialEq,
impl<I, T, const N: usize> PartialEq<[T; N]> for IndexSlice<I, T>where
I: IndexingType,
T: PartialEq,
Source§impl<I, T> PartialEq<IndexSlice<I, T>> for [T]where
I: IndexingType,
T: PartialEq,
impl<I, T> PartialEq<IndexSlice<I, T>> for [T]where
I: IndexingType,
T: PartialEq,
Source§impl<I, T> PartialEq<IndexSlice<I, T>> for IndexVec<I, T>where
I: IndexingType,
T: PartialEq,
impl<I, T> PartialEq<IndexSlice<I, T>> for IndexVec<I, T>where
I: IndexingType,
T: PartialEq,
Source§impl<I, T> PartialEq<IndexVec<I, T>> for IndexSlice<I, T>where
I: IndexingType,
T: PartialEq,
impl<I, T> PartialEq<IndexVec<I, T>> for IndexSlice<I, T>where
I: IndexingType,
T: PartialEq,
Source§impl<I, T> PartialEq for IndexSlice<I, T>
impl<I, T> PartialEq for IndexSlice<I, T>
Source§impl<I, T> PartialOrd for IndexSlice<I, T>where
I: PartialOrd,
T: PartialOrd,
impl<I, T> PartialOrd for IndexSlice<I, T>where
I: PartialOrd,
T: PartialOrd,
Source§impl<I, T> RefCast for IndexSlice<I, T>
impl<I, T> RefCast for IndexSlice<I, T>
type From = [T]
fn ref_cast(_from: &<IndexSlice<I, T> as RefCast>::From) -> &IndexSlice<I, T>
fn ref_cast_mut( _from: &mut <IndexSlice<I, T> as RefCast>::From, ) -> &mut IndexSlice<I, T>
impl<I, T> Eq for IndexSlice<I, T>
impl<I, T> StructuralPartialEq for IndexSlice<I, T>
Auto Trait Implementations§
impl<I, T> Freeze for IndexSlice<I, T>where
T: Freeze,
impl<I, T> RefUnwindSafe for IndexSlice<I, T>where
T: RefUnwindSafe,
impl<I, T> Send for IndexSlice<I, T>where
T: Send,
impl<I, T> !Sized for IndexSlice<I, T>
impl<I, T> Sync for IndexSlice<I, T>where
T: Sync,
impl<I, T> Unpin for IndexSlice<I, T>where
T: Unpin,
impl<I, T> UnwindSafe for IndexSlice<I, T>where
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
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Pipes by value. This is generally the method you want to use. Read more
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
Borrows
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
Mutably borrows
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
Borrows
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
Mutably borrows
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
Borrows
self, then passes self.deref() into the pipe function.