rust-derive-builder icon indicating copy to clipboard operation
rust-derive-builder copied to clipboard

Document `each` for extending collections.

Open nathan-at-least opened this issue 1 year ago • 1 comments

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.

nathan-at-least avatar May 07 '23 17:05 nathan-at-least

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

TedDriggs avatar May 08 '23 20:05 TedDriggs