docs.rs failed to build primitive_enum-1.0.1
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
primitive_enum-1.2.0
rust-primitive_enum
Little utility for dealing with C-style enums
This crate exports just the single macro primitive_enum!
that defines an enum backed by a user specified primitive
integer type.
The intent is to emulate traditional C-style enums while adding some handy associated functions useful in such contexts (e.g. enumerating over each enum and converting between the underlying types).
Example
extern crate primitive_enum;
primitive_enum!
Expansion
As of the current version, the macro
extern crate primitive_enum;
primitive_enum!
is effectively equivalent to
This crate is a clean macro implementation that expands to code shown above and doesn't rely on any outside dependencies or magic.