4 releases

Uses old Rust 2015

0.2.1 Apr 16, 2018
0.1.2 May 31, 2017
0.1.1 May 31, 2017
0.1.0 May 31, 2017

#20 in #try-from

32 downloads per month
Used in enum-tryfrom

MIT license

5KB
68 lines

Enum TryFrom

Build Status

A crate to derive the TryFrom trait on enums using procedural macros.

Expect frequent breakage for now.

Documentation

Documentation

This adds the ability to #[derive(TryFromPrimitive)], which in combination with one (well zero, but that's not useful) or more #[FromPrimitiveType="type"] attributes lets you automatically derive TryFrom<type> for enum types.

Detailed documentation can be generated with cargo doc.


lib.rs:

This crate contains macros for deriving useful traits on C-like enums

Dependencies

~1.5MB
~40K SLoC