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

#11 in #custom-derive

Download history 52/week @ 2023-11-27 18/week @ 2023-12-04 1/week @ 2023-12-11 12/week @ 2023-12-18 26/week @ 2023-12-25 9/week @ 2024-01-01 13/week @ 2024-01-08 1/week @ 2024-01-15 20/week @ 2024-01-22 45/week @ 2024-01-29 53/week @ 2024-02-05 19/week @ 2024-02-12 25/week @ 2024-02-19 103/week @ 2024-02-26 26/week @ 2024-03-04 15/week @ 2024-03-11

172 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
~46K SLoC