Macro bit_struct::enums
source · [−]macro_rules! enums {
(
$(
$(#[doc = $struct_doc:expr])*
$(#[derive($($struct_der:ident),+)])?
$enum_vis: vis $name: ident $(($enum_default: ident))? {
$(#[doc = $fst_field_doc:expr])*
$fst_field: ident
$(,
$(#[doc = $field_doc:expr])*
$field: ident
)* $(,)?
}
)+
) => { ... };
}
Expand description
Create enums which have convenient TryFrom/From implementations. This makes using them with the bit_struct macro much easier.