bon icon indicating copy to clipboard operation
bon copied to clipboard

Next-gen compile-time-checked builder generator, named function's arguments, and more!

Results 48 bon issues
Sort by recently updated
recently updated
newest added

Let me give an example and I will describe the ask as an inline comment. ```rust use bon::builder; #[builder] #[derive(Debug)] struct TestStruct { // The following expression will generate a...

feature request

When using `#[builder]` on a function, `String` arguments are turned into `Into`. This feels wrong — `String` may have been an intentional choice by the author to, for instance, force...

feature request

Awesome library! Had a lot of fun using it so far. I have an edge case where one of my input argument is an `Option` since I want to encode...

feature request
papercut

Hello and thank you for writing this lib! I'm wondering if extending this lib with validation would be in scope. What I'm imagining is an interface where I can specify...

design needed
feature request

First of all, thank you for this fantastic crate, I love the idea of functions and structs sharing a builder derive, and the documentation is brilliant, the big effort that...

feature request
papercut

I'd love to have the option to supply required fields of a struct as args to the first method call (basically deriving a `new` method), leaving optional ones as separate...

design needed
feature request

Appreciate this might be quite difficult to do: If you want to pass around a builder you have to specify the state of the builder: ```rust #[bon::builder] pub struct T...

feature request

I'd love to be able to completely customise the input type for builder methods, for situations where `impl Into` isn't enough. For example, if I have a `HashSet` as a...

feature request

Here is how the rustdoc output looks like for the example from the [`Documenting` section](https://elastio.github.io/bon/docs/guide/documenting). It isn't pretty, but we may probably do better. For example, leading `__` in generic...

documentation