Skip to main content

Indexable

Trait Indexable 

Source
pub trait Indexable {
    type Item: IsNull;

    // Required methods
    fn get(&self, i: usize) -> Self::Item;
    unsafe fn get_unchecked(&self, i: usize) -> Self::Item;
}

Required Associated Types§

Required Methods§

Source

fn get(&self, i: usize) -> Self::Item

Source

unsafe fn get_unchecked(&self, i: usize) -> Self::Item

§Safety

Doesn’t do any bound checks.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T: Copy + IsNull> Indexable for &[T]

Source§

unsafe fn get_unchecked(&self, i: usize) -> Self::Item

§Safety

Doesn’t do any bound checks.

Source§

type Item = T

Source§

fn get(&self, i: usize) -> Self::Item

Implementors§