endian_trait_derive 0.5.0

A custom derive for the Endian trait
Documentation

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;