Crates.io | endian_trait_derive |
lib.rs | endian_trait_derive |
version | 0.6.0 |
source | src |
created_at | 2017-08-20 01:38:17.631475 |
updated_at | 2018-06-25 20:40:57.592423 |
description | A custom derive for the Endian trait |
homepage | |
repository | https://gitlab.com/myrrlyn/endian_trait |
max_upload_size | |
id | 28212 |
size | 15,137 |
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;