rustc_macros

Derive Macro TryFromU32

Source
#[derive(TryFromU32)]
Expand description

Derives TryFrom<u32> for the annotated enum, which must have no fields. Each variant maps to the value it would produce under an as u32 cast.

The error type is u32.