Macro typemap_core::typemap_ty[][src]

macro_rules! typemap_ty {
    () => { ... };
    ($ty:ty, $($rest:tt)*) => { ... };
    ($ty:ty) => { ... };
    (..$ty:ty) => { ... };
}

Helper for expressing the type of a typemap.

Takes a comma separated list of types, optionally followed by a single type representing the rest of the list in the form ..RestType.

For instance,

type Example = typemap_ty!(u16, u8);
let _: typemap_ty!(u64, u32, ..&Example);

expands to:

type Example = Ty<u16, Ty<u8, TyEnd>>;
let _: Ty<u64, Ty<u32, &Example>>;