intuicio_core::preludeMacro define_native_enum
Source macro_rules! define_native_enum {
(
$registry:expr
=>
$(mod $module_name:ident)?
enum $($name:ident)? ($type:tt) {
$( $variant:tt )*
}
[uninitialized]
$( [override_send = $override_send:literal] )?
$( [override_sync = $override_sync:literal] )?
$( [override_copy = $override_copy:literal] )?
) => { ... };
(
$registry:expr
=>
$(mod $module_name:ident)?
enum $($name:ident)? ($type:tt) {
$( $variant:tt )*
}
$( [override_send = $override_send:literal] )?
$( [override_sync = $override_sync:literal] )?
$( [override_copy = $override_copy:literal] )?
) => { ... };
(@fields_tuple $registry:expr => $variant:expr => $type:tt => $name:ident => {
$current_field_name:ident : $current_field_type:ty $( , $rest_field_name:ident : $rest_field_type:ty )*
} => { $($field_name:ident),* } => $discriminant:literal) => { ... };
(@fields_tuple $registry:expr => $variant:expr => $type:tt => $name:ident => {} => { $($field_name:ident),* } => $discriminant:literal) => { ... };
(@variant $registry:expr => $result:expr => $type:tt => {
$name:ident ( $( $field_name:ident : $field_type:ty ),* ) = $discriminant:literal
}) => { ... };
(@variant $registry:expr => $result:expr => $type:tt => {
$name:ident { $( $field_name:ident : $field_type:ty ),* } = $discriminant:literal
}) => { ... };
(@variant $registry:expr => $result:expr => $type:tt => {
$name:ident = $discriminant:literal
}) => { ... };
}