type_slicer_derive 0.1.0

type_slicer::ByteRepr の derive マクロ
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#![doc = include_str!("../README.md")]
#![warn(
    missing_docs,
    rustdoc::missing_crate_level_docs,
    unused_results,
    clippy::complexity,
    clippy::perf,
    clippy::style
)]
#![deny(clippy::correctness, clippy::suspicious)]

mod type_slicer_derive;

/// Derive macro for `ByteRepr` trait.
#[proc_macro_derive(ByteRepr)]
pub fn derive_byte_repr(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
    type_slicer_derive::derive_byte_repr_impl(input.into()).into()
}