colin-kiegel / rust-derive-builder

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

Document `each` for extending collections. #288

Open nathan-at-least opened 1 year ago

nathan-at-least commented 1 year ago

Request

Document collection extension with each directive.

Next Steps

I may submit a PR with the documentation as I learn how each works. I've read https://github.com/colin-kiegel/rust-derive-builder/issues/287 and then discovered the expansion definition.

Background

I just discovered derive_builder yesterday after an hour of tediously hand-writing multiple builder types. This is a very useful tool!

I converted every builder in my project to use derive_builder except for a builder that needed to extend a BTreeMap. When I came this issue tracker to see if others had asked for this support, I found https://github.com/colin-kiegel/rust-derive-builder/issues/287 and realized there's already functionality for this. I went back and read over the crate docs, but couldn't find any detail on that.

TedDriggs commented 1 year ago

A PR with a documentation update and/or an entry in examples would be welcome.