HList

Macro HList 

Source
macro_rules! HList {
    () => { ... };
    ($head:ty $(,)?) => { ... };
    ($head:ty, $($tail:ty),* $(,)?) => { ... };
}
Expand description

Macro creating heterogenous list types from list of element types.

This macro supports trailing comma at the end of list of element types.

ยงExamples

This macro can be used to name heterogenous list type as easily as tuple type without cons-nil boilerplate:

use hlist2::{hlist, HList, Cons, Nil};

let list: HList![i32, f64, bool] = hlist![1, 2.0, true];
let list: Cons<i32, Cons<f64, Cons<bool, Nil>>> = list;