GetExt

Trait GetExt 

Source
pub trait GetExt<T> {
    // Required methods
    fn e_get<I: SliceIndex<[T]>>(
        &self,
        index: I,
    ) -> Result<&<I as SliceIndex<[T]>>::Output, ReadError>;
    fn e_get_mut<I: SliceIndex<[T]>>(
        &mut self,
        index: I,
    ) -> Result<&mut <I as SliceIndex<[T]>>::Output, ReadError>;
}

Required Methods§

Source

fn e_get<I: SliceIndex<[T]>>( &self, index: I, ) -> Result<&<I as SliceIndex<[T]>>::Output, ReadError>

Source

fn e_get_mut<I: SliceIndex<[T]>>( &mut self, index: I, ) -> Result<&mut <I as SliceIndex<[T]>>::Output, ReadError>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<T> GetExt<T> for [T]

Source§

fn e_get<I: SliceIndex<[T]>>( &self, index: I, ) -> Result<&<I as SliceIndex<[T]>>::Output, ReadError>

Source§

fn e_get_mut<I: SliceIndex<[T]>>( &mut self, index: I, ) -> Result<&mut <I as SliceIndex<[T]>>::Output, ReadError>

Implementors§