Skip to main content

Access

Trait Access 

Source
pub trait Access<T, N>: HList + Sized {
    type Remainder;

    // Required methods
    fn take(self) -> (T, Self::Remainder);
    fn get(&self) -> &T;
    fn get_mut(&mut self) -> &mut T;
}

Required Associated Types§

Required Methods§

Source

fn take(self) -> (T, Self::Remainder)

Source

fn get(&self) -> &T

Source

fn get_mut(&mut self) -> &mut T

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§

Source§

impl<T, R: HList> Access<T, Zero> for Cons<T, R>

Source§

impl<T, U, R: Access<U, N>, N> Access<U, Succ<N>> for Cons<T, R>

Source§

type Remainder = Cons<T, <R as Access<U, N>>::Remainder>