MapToList

Trait MapToList 

Source
pub trait MapToList<F, U>: HList {
    type Output: ConsListT<U>;

    // Required method
    fn map_to_list(self, f: F) -> ConsList<U, Self::Output>;
}

Required Associated Types§

Required Methods§

Source

fn map_to_list(self, f: F) -> ConsList<U, Self::Output>

Map a monomorphizing function over the HList to produce an iterable datastructure which lives fully on stack

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<F, U> MapToList<F, U> for HNil

Source§

type Output = Nil

Source§

fn map_to_list(self, _f: F) -> ConsList<U, Self::Output>

Source§

impl<F: Func<Head, Output = U>, U, Head, Tail: MapToList<F, U>> MapToList<F, U> for HCons<Head, Tail>

Source§

type Output = Cons<U, <Tail as MapToList<F, U>>::Output>

Source§

fn map_to_list(self, f: F) -> ConsList<U, Self::Output>

Implementors§