Registry / utility / enumn
library0.1.14rscratesunverified

Converts numbers to enum variants using a derive macro.

# Cargo.toml [dependencies] enumn = "0.1.14"
INSTALL
IMPORT
SIG · ENUMN
E
enumn
utilityrustv0.1.14
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

N
use enumn::N;

Converts an integer to an enum variant using the N derive macro.

use enumn::N; #[derive(N)] enum Color { Red, Green, Blue, } fn main() { let color = Color::n(1).unwrap(); println!("{:?}", color); }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.1.14latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
8 hits · last 30 days
node
8
Resources
enumn — cargo add enumn · libregistry