Closed sunng87 closed 2 years ago
Have you looked at the each
setter options?
Cool. That seems to be my need. I'll do some experiment with it and come back to you later.
It works! Thank you for your response.
I'm sorry to dig up this issue, but has this feature been removed ? I can't find any mention of each
in the docs and this doesn't build:
error: Unexpected meta-item format `word`
--> src/parse.rs:17:22
|
17 | #[builder(setter(each))]
| ^^^^
A further step for supporting collection types like
Vec
orHashMap
is to generate insertion function for its content types. This allows user to create collection in a declarative manner.For Example:
Generated builder contains a function called
push_member
, by which you can