Releases: ZihanType/from-attr
Releases · ZihanType/from-attr
0.1.2
- feat: add
Map
, which supports the following:#[derive(FromAttr, PartialEq, Eq, Debug)] #[attribute(idents = [test])] struct Test { a: Map<i32, String>, } let attrs = [parse_quote!(#[test(a = { 1 : "hi", 2 : "ho" })])]; assert_eq!( Test::from_attributes(&attrs).unwrap().unwrap().value, Test { a: Map(vec![(1, "hi".to_string()), (2, "ho".to_string())]) } );