bon
bon copied to clipboard
Next-gen compile-time-checked builder generator, named function's arguments, and more!
Hello, `bon` is great, thanks for sharing it! I have a use-case where I have a large variety of structs that are all subtly different. I'm wondering if it would...
This is a tracking issue for the `#[builder(getter)]` attribute feature. The stabilization of the design for this attribute requires some more feedback from the community. If you think the current...
Closes https://github.com/elastio/bon/issues/230 This is still WIP, and isn't finished yet. Need to update the impl according to the envisioned design described in https://github.com/elastio/bon/issues/230#issuecomment-2540119166. Waiting on OP to establish the final...
Hi there, First off, thank you for creating and maintaining Bon—it’s been a pleasure working with it! As I migrate a codebase to Bon, I’ve run into a challenge with...
dCurrently, there is a `#[builder(on(pattern, attrs))]` attribute that supports `into` configuration. With that one it's possible to enable `#[builder(into)]` for all members like this: ```rust #[derive(bon::Builder)] #[builder(on(_, into))] struct Example...
This issue is based on [prior thoughts](https://bon-rs.com/guide/alternatives#special-setter-methods-for-collections) in the alternatives section of the docs. ## Design I don't have a good design for the attribute yet. There are many unresolved...
## Problem Statement The original conversation about this happened in https://github.com/ayrat555/frankenstein/pull/231#issuecomment-2494141029. The problem is that builders are sometimes more of a noise in the docs. Having builder types appear in...
I've tried the nightly feature `#![feature(associated_type_defaults)]` to get rid of repetitive `type {Member} = Unset;` entries in impl blocks for `Set{Member}` typestates. This yielded a considerable compilation perf. improvement from...
Great library! It would be really powerful to provide concrete defaults for generic parameters, the below example fails to compile: ```rust #[builder] fn foo(#[builder(default = std::iter::empty())] arg: impl IntoIterator) {...
### A note for the community from the maintainers Please vote on this issue by adding a 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to help the maintainers with prioritizing it. You may add a...