educe/trait_handlers/
mod.rs

1use syn::{DeriveInput, Meta};
2
3use crate::Trait;
4
5#[cfg(feature = "Clone")]
6pub(crate) mod clone;
7#[cfg(feature = "Copy")]
8pub(crate) mod copy;
9#[cfg(feature = "Debug")]
10pub(crate) mod debug;
11#[cfg(feature = "Default")]
12pub(crate) mod default;
13#[cfg(feature = "Deref")]
14pub(crate) mod deref;
15#[cfg(feature = "DerefMut")]
16pub(crate) mod deref_mut;
17#[cfg(feature = "Eq")]
18pub(crate) mod eq;
19#[cfg(feature = "Hash")]
20pub(crate) mod hash;
21#[cfg(feature = "Into")]
22pub(crate) mod into;
23#[cfg(feature = "Ord")]
24pub(crate) mod ord;
25#[cfg(feature = "PartialEq")]
26pub(crate) mod partial_eq;
27#[cfg(feature = "PartialOrd")]
28pub(crate) mod partial_ord;
29
30pub(crate) trait TraitHandler {
31    #[allow(dead_code)]
32    fn trait_meta_handler(
33        ast: &DeriveInput,
34        token_stream: &mut proc_macro2::TokenStream,
35        traits: &[Trait],
36        meta: &Meta,
37    ) -> syn::Result<()>;
38}
39
40pub(crate) trait TraitHandlerMultiple {
41    #[allow(dead_code)]
42    fn trait_meta_handler(
43        ast: &DeriveInput,
44        token_stream: &mut proc_macro2::TokenStream,
45        traits: &[Trait],
46        meta: &[Meta],
47    ) -> syn::Result<()>;
48}