unchecked_index

Trait GetUnchecked

Source
pub trait GetUnchecked<I>: CheckIndex<I> {
    type Output: ?Sized;

    // Required method
    unsafe fn get_unchecked(&self, index: I) -> &Self::Output;
}

Required Associated Types§

Required Methods§

Source

unsafe fn get_unchecked(&self, index: I) -> &Self::Output

Implementations on Foreign Types§

Source§

impl<'a, T, I> GetUnchecked<I> for &'a T
where T: GetUnchecked<I> + ?Sized,

Source§

type Output = <T as GetUnchecked<I>>::Output

Source§

unsafe fn get_unchecked(&self, index: I) -> &Self::Output

Source§

impl<'a, T, I> GetUnchecked<I> for &'a mut T
where T: GetUnchecked<I> + ?Sized,

Source§

type Output = <T as GetUnchecked<I>>::Output

Source§

unsafe fn get_unchecked(&self, index: I) -> &Self::Output

Source§

impl<T> GetUnchecked<usize> for [T]

Source§

type Output = <[T] as Index<usize>>::Output

Source§

unsafe fn get_unchecked(&self, index: usize) -> &Self::Output

Source§

impl<T> GetUnchecked<Range<usize>> for [T]

Source§

type Output = <[T] as Index<Range<usize>>>::Output

Source§

unsafe fn get_unchecked(&self, index: Range<usize>) -> &Self::Output

Source§

impl<T> GetUnchecked<RangeFrom<usize>> for [T]

Source§

type Output = <[T] as Index<RangeFrom<usize>>>::Output

Source§

unsafe fn get_unchecked(&self, index: RangeFrom<usize>) -> &Self::Output

Source§

impl<T> GetUnchecked<RangeFull> for [T]

Source§

type Output = <[T] as Index<RangeFull>>::Output

Source§

unsafe fn get_unchecked(&self, index: RangeFull) -> &Self::Output

Source§

impl<T> GetUnchecked<RangeTo<usize>> for [T]

Source§

type Output = <[T] as Index<RangeTo<usize>>>::Output

Source§

unsafe fn get_unchecked(&self, index: RangeTo<usize>) -> &Self::Output

Implementors§