pub trait GetIndex {
type Output;
// Required methods
fn len(&self) -> usize;
fn get(&self, index: usize) -> Option<Self::Output>;
unsafe fn get_unchecked(&self, index: usize) -> Self::Output;
}
Required Associated Types§
Required Methods§
sourceunsafe fn get_unchecked(&self, index: usize) -> Self::Output
unsafe fn get_unchecked(&self, index: usize) -> Self::Output
Returns an item of the collection
Safety
Undefined behavior if the index is past the end of the collection.