OptionalStruct
OptionalStruct copied to clipboard
Feature request: support struct attributes of the form HashMap<key, OptionalStruct> and Vec<OptionalStruct>
Thanks for the very handy library, which has made managing config files in tenx much nicer. It would be great to have support for HashMap and Vec struct attributes, where the contained values are themselves optional structs. Ideally, I'd like to be able to do something like this:
#[optional_struct]
#[derive(Eq, PartialEq, Debug)]
struct ValueStruct {
...
}
#[optional_struct]
#[derive(Eq, PartialEq, Debug)]
struct MyStruct {
#[optional_hash(OptionalValueStruct)]
#[optional_wrap]
mymap: HashMap<String, ValueStruct>
}