1#![forbid(unsafe_code)]
2#![deny(
3 clippy::dbg_macro,
4 missing_copy_implementations,
5 rustdoc::missing_crate_level_docs,
6 missing_debug_implementations,
7 nonstandard_style,
8 unused_qualifications
9)]
10#![warn(missing_docs, clippy::nursery, clippy::cargo)]
11#![allow(clippy::must_use_candidate, clippy::module_name_repetitions)]
12#![doc = include_str!("../README.md")]
13
14mod handler;
15#[proc_macro_derive(Handler, attributes(handler))]
17pub fn derive_handler(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
18 handler::derive_handler(input)
19}
20
21mod transport;
22#[proc_macro_derive(Transport, attributes(transport))]
24pub fn derive_transport(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
25 transport::derive_transport(input)
26}
27
28mod async_read;
29#[proc_macro_derive(AsyncRead, attributes(async_read, async_io))]
31pub fn derive_async_read(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
32 async_read::derive_async_read(input)
33}
34
35mod async_write;
36#[proc_macro_derive(AsyncWrite, attributes(async_write, async_io))]
38pub fn derive_async_write(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
39 async_write::derive_async_write(input)
40}