i_slint_common

Macro for_each_enums

Source
macro_rules! for_each_enums {
    ($macro:ident) => { ... };
}
Expand description

Call a macro with every enum exposed in the .slint language

ยงExample

macro_rules! print_enums {
    ($( $(#[$enum_doc:meta])* enum $Name:ident { $( $(#[$value_doc:meta])* $Value:ident,)* })*) => {
        $(println!("{} => [{}]", stringify!($Name), stringify!($($Value),*));)*
    }
}
i_slint_common::for_each_enums!(print_enums);