Macro frunk::HList

source ·
macro_rules! HList {
    () => { ... };
    (...$Rest:ty) => { ... };
    ($A:ty) => { ... };
    ($A:ty, $($tok:tt)*) => { ... };
}
Expand description

Returns a type signature for an HList of the provided types

This is a type macro (introduced in Rust 1.13) that makes it easier to write nested type signatures.

Examples

let h: HList!(f32, &str, Option<i32>) = hlist![13.5f32, "hello", Some(41)];

// Use "...Tail" to append another HList type at the end.
let h: HList!(f32, ...HList!(&str, Option<i32>)) = hlist![13.5f32, "hello", Some(41)];
Run