unchecked_index

Trait CheckIndex

Source
pub trait CheckIndex<I> {
    // Required method
    fn assert_indexable_with(&self, index: &I);
}

Required Methods§

Source

fn assert_indexable_with(&self, index: &I)

Assert (using a regular assertion) that the index is valid. Must not return if the index is invalid for indexing self.

Panics if index is invalid.

Implementations on Foreign Types§

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Implementors§