#![allow(unused)] use custom_attrs::CustomAttrs; #[derive(CustomAttrs)] #[attr( #[function = "another_function"] pub a: usize, #[function = "another_function"] pub b: usize = 0, )] enum Enum { #[attr(a = 5)] Variant1, #[attr(a = 3)] Variant2, } fn main() { // let a = Enum::Variant1.get_a(); }