Macro rubble::utils::enum_with_unknown[][src]

macro_rules! enum_with_unknown {
    ($(#[$enum_attr : meta]) * $v : vis enum $name : ident($ty : ty)
 {
     $($(#[$variant_attr : meta]) * $variant : ident = $value : expr), * $(,)
     ?
 }) => { ... };
}
Expand description

Creates an enum that can be converted from and to a primitive type, with invalid values becoming a catch-all Unknown variant.

This is copied almost verbatim from smoltcp.