intuicio_core::prelude

Macro define_runtime_enum

Source
macro_rules! define_runtime_enum {
    (
        $registry:expr
        =>
        $(mod $module_name:ident)?
        enum $name:ident {
            $( $variant:tt )*
        }
    ) => { ... };
    (@variant $registry:expr => $result:expr => {
        $name:ident $( ( $( $field_name:ident : $field_type:ty ),+ ) )? = $discriminant:literal
    }) => { ... };
    (@variant $registry:expr => $result:expr => {
        $name:ident $( ( $( $field_name:ident : $field_type:ty ),+ ) )?
    }) => { ... };
    (@variant $registry:expr => $result:expr => {
        $name:ident $( { $( $field_name:ident : $field_type:ty ),+ } )? = $discriminant:literal
    }) => { ... };
    (@variant $registry:expr => $result:expr => {
        $name:ident $( { $( $field_name:ident : $field_type:ty ),+ } )?
    }) => { ... };
}