Trait FromPrimitive
num_enum
pub trait FromPrimitive: Sized { type Primitive: Copy + Eq; fn from_primitive(number: Self::Primitive) -> Self; }
type Primitive: Copy + Eq
fn from_primitive(number: Self::Primitive) -> Self