filterable-enum-derive 0.1.2

A derive macro for generating filterable enums (Combining bitflags and discriminated unions)
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use darling::FromDeriveInput;

#[derive(FromDeriveInput)]
#[darling(attributes(filterable_enum), forward_attrs(allow, doc, cfg))]
pub struct Opts {
    #[allow(unused)]
    ident: syn::Ident,
    #[allow(unused)]
    attrs: Vec<syn::Attribute>,
    pub repr: Option<String>,
    #[darling(multiple)]
    pub kind_extra_derive: Vec<syn::Ident>,
    #[darling(multiple)]
    // TODO: there should be a better way to pass through the attributes
    pub kind_extra_attrs: Vec<String>,
}