colin-kiegel / rust-derive-builder

derive builder implementation for rust structs
https://colin-kiegel.github.io/rust-derive-builder/
Apache License 2.0
1.28k stars 82 forks source link

Add an option to extend collection-like fields (`each`-version) #199

Closed andy128k closed 3 years ago

andy128k commented 3 years ago

Closes #114 Closes #196

andy128k commented 3 years ago

This implementation does not support things like #[builder(setter(skip = "true", each = "foo"))].

TedDriggs commented 3 years ago

This feels like the right API; thanks for taking the time to go through multiple iterations on it.

This implementation does not support things like #[builder(setter(skip = "true", each = "foo"))].

What happens if someone tries? Does the skip preempt the each, or does the each overrule the skip?

andy128k commented 3 years ago

This feels like the right API; thanks for taking the time to go through multiple iterations on it.

This implementation does not support things like #[builder(setter(skip = "true", each = "foo"))].

What happens if someone tries? Does the skip preempt the each, or does the each overrule the skip?

No setter is generated and each is ignored.