Macro scale_info::tuple_meta_type[][src]

macro_rules! tuple_meta_type {
    ($($ty : ty), *) => { ... };
}
Expand description

Takes a number of types and returns a vector that contains their respective MetaType instances.

This is useful for places that require inputs of iterators over MetaType instances and provide a way out of code bloat in these scenarios.

Example

assert_eq!(
    tuple_meta_type!(i32, [u8; 32], String),
    {
        use scale_info::MetaType;
        let mut vec = Vec::new();
        vec.push(MetaType::new::<i32>());
        vec.push(MetaType::new::<[u8; 32]>());
        vec.push(MetaType::new::<String>());
        vec
    }
);