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

Download history 39/week @ 2024-07-22 46/week @ 2024-07-29 21/week @ 2024-08-05 14/week @ 2024-08-12 47/week @ 2024-08-19 37/week @ 2024-08-26 16/week @ 2024-09-02 10/week @ 2024-09-09 23/week @ 2024-09-16 67/week @ 2024-09-23 25/week @ 2024-09-30 39/week @ 2024-10-07 29/week @ 2024-10-14 36/week @ 2024-10-21 37/week @ 2024-10-28 59/week @ 2024-11-04

168 downloads per month
Used in endian_trait

MIT license

12KB
123 lines

Endian Trait Derivation

Crate Docs Gitlab CI Status Travis CI Status

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