9 releases (5 breaking)
Uses old Rust 2015
0.6.0 | Jun 25, 2018 |
---|---|
0.5.0 | Mar 1, 2018 |
0.4.0 | Feb 24, 2018 |
0.3.2 | Feb 23, 2018 |
0.1.1 | Aug 23, 2017 |
#12 in #custom-derive
168 downloads per month
Used in endian_trait
12KB
123 lines
Endian Trait Derivation
This provides a custom derive for the Endian trait on structs. It can operate on normal braced structs, tuple structs, and unit structs, as well as enums with an integer representation and no data.
Rust currently does not permit procedural macro tags to be placed on unions, so this macro cannot support them.
This crate cannot be used standalone, as it generates code referring to the
Endian
trait, which only exists in the endian_trait
crate. That crate
re-exports the procedural macro defined here.
[dependencies]
endian_trait = "0.5"
#[macro_use]
extern crate endian_trait;
Dependencies
~2MB
~48K SLoC