scale_info

Macro named_type_params

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

Construct a vector of TypeParameters from pairs of the name and the concrete type.

ยงExample

assert_eq!(
    named_type_params![(T, u8), (U, u32)],
    vec! [
        TypeParameter::new("T", Some(MetaType::new::<u8>())),
        TypeParameter::new("U", Some(MetaType::new::<u32>())),
    ]
);