Trait TupleIndexExt

Source
pub trait TupleIndexExt: Sized {
    type IndexMax: TupleIndex;

    // Required methods
    fn size_tuple() -> usize;
    fn size(&self) -> usize;

    // Provided methods
    fn get<I: TupleIndex>(&self) -> &<Self as TupleGetIndexExt<I>>::ElementType
       where Self: TupleGetIndexExt<I> { ... }
    fn get_mut<I: TupleIndex>(
        &mut self,
    ) -> &mut <Self as TupleGetIndexExt<I>>::ElementType
       where Self: TupleGetIndexExt<I> { ... }
}

Required Associated Types§

Required Methods§

Provided Methods§

Source

fn get<I: TupleIndex>(&self) -> &<Self as TupleGetIndexExt<I>>::ElementType
where Self: TupleGetIndexExt<I>,

Source

fn get_mut<I: TupleIndex>( &mut self, ) -> &mut <Self as TupleGetIndexExt<I>>::ElementType
where Self: TupleGetIndexExt<I>,

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.

Implementors§