pub trait OpsIndex<Idx: ?Sized> {
    type Output: ?Sized;

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

Required Associated Types§

source

type Output: ?Sized

The returned type after indexing.

Required Methods§

source

fn index(&self, index: Idx) -> &Self::Output

Performs the indexing (container[index]) operation.

§Panics

May panic if the index is out of bounds.

Implementors§