[][src]Trait index_vec::IdxSliceIndex

pub trait IdxSliceIndex<I: Idx, T>: Sealed {
    type Output: ?Sized;
    fn get(self, slice: &IndexSlice<I, [T]>) -> Option<&Self::Output>;
fn get_mut(
        self,
        slice: &mut IndexSlice<I, [T]>
    ) -> Option<&mut Self::Output>;
fn index(self, slice: &IndexSlice<I, [T]>) -> &Self::Output;
fn index_mut(self, slice: &mut IndexSlice<I, [T]>) -> &mut Self::Output; }

This is the equivalent of the sealed core::slice::SliceIndex trait. It cannot be overridden from user, code nor should it normally need use directly (Outside of trait bounds, I guess).

Associated Types

type Output: ?Sized

Loading content...

Required methods

fn get(self, slice: &IndexSlice<I, [T]>) -> Option<&Self::Output>

fn get_mut(self, slice: &mut IndexSlice<I, [T]>) -> Option<&mut Self::Output>

fn index(self, slice: &IndexSlice<I, [T]>) -> &Self::Output

fn index_mut(self, slice: &mut IndexSlice<I, [T]>) -> &mut Self::Output

Loading content...

Implementations on Foreign Types

impl<I: Idx, T> IdxSliceIndex<I, T> for Range<I>[src]

type Output = IndexSlice<I, [T]>

impl<I: Idx, T> IdxSliceIndex<I, T> for RangeFrom<I>[src]

type Output = IndexSlice<I, [T]>

impl<I: Idx, T> IdxSliceIndex<I, T> for RangeTo<I>[src]

type Output = IndexSlice<I, [T]>

impl<I: Idx, T> IdxSliceIndex<I, T> for RangeInclusive<I>[src]

type Output = IndexSlice<I, [T]>

impl<I: Idx, T> IdxSliceIndex<I, T> for RangeToInclusive<I>[src]

type Output = IndexSlice<I, [T]>

impl<I: Idx, T> IdxSliceIndex<I, T> for RangeFull[src]

type Output = IndexSlice<I, [T]>

Loading content...

Implementors

impl<I: Idx, T> IdxSliceIndex<I, T> for I[src]

type Output = T

impl<I: Idx, T> IdxSliceIndex<I, T> for usize[src]

type Output = T

Loading content...