enum-repr
Generate enum repr conversions compatible with type aliases. Works on no_std
.
EnumRepr
proc macro takes an type
argument and defines two functions
for the enum used on:
fn repr(&self) -> EnumReprType
fn from_repr(x: EnumReprType) -> Option<Self>
The real enum discriminant still remains isize
.
extern crate enum_repr;
extern crate libc;
use *;
use EnumRepr;
License
This project is licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.