macro_rules! TList {
() => { ... };
(..$rest:ty) => { ... };
($current:ty) => { ... };
($elem_0:ty,$elem_1:ty,$elem_2:ty,$elem_3:ty,$elem_4:ty, $($rest:tt)*) => { ... };
($elem_0:ty,$elem_1:ty,$elem_2:ty,$elem_3:ty, $($rest:tt)*) => { ... };
($elem_0:ty,$elem_1:ty,$elem_2:ty, $($rest:tt)*) => { ... };
($elem_0:ty,$elem_1:ty, $($rest:tt)*) => { ... };
($current:ty, $($rest:tt)*) => { ... };
}
Type macro for a type-list.
This macro creates an ordered sequence of types,
This example is equivalent to TList<String,TList<&'a str,TList<Cow<'a,str>,Nil>>>
.
use structural::TList;
use std::borrow::Cow;
type StringsTypes<'a>=TList![ String,&'a str,Cow<'a,str> ];