simple_endian_derive 0.4.5

Proc-macros for the simple_endian crate.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//! Proc-macros for `simple_endian`.
//!
//! This crate is intentionally small and only provides codegen helpers.

use proc_macro::TokenStream;

mod endianize;

/// Generate a “wire-format” struct and endian wrapper aliases.
///
/// See the `simple_endian` crate docs for examples.
#[proc_macro_derive(Endianize, attributes(endian, text, wire_repr, wire_derive))]
pub fn derive_endianize(input: TokenStream) -> TokenStream {
    endianize::derive_endianize(input)
}