1 2 3 4 5 6 7 8 9 10 11 12
#![allow(dead_code)] use field_names::FieldNames; #[derive(FieldNames)] struct Example<T> { hello: T, world: String, } fn main() { println!("{:?}", Example::<()>::FIELDS); }