[][src]Macro scale_info::tuple_meta_type

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

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 scenarious.

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
    }
);