Crate macrokit

Crate macrokit 

Source
Expand description

§Macrokit ⚙️

A collection of procedural derive macros for Rust.

§Features

  • #[derive(FromReprAsOption)]: For safe, fallible conversions from an integer representation to an enum, returning an Option<Self>.
  • #[derive(FromReprWithUnknown)]: For infallible conversions that require an Unknown variant as a fallback.

Derive Macros§

FromReprAsOption
Derives a from_repr function for an enum.
FromReprWithUnknown
Derives an impl From<T> for an enum that has an Unknown variant.