bon
bon copied to clipboard
Next-gen compile-time-checked builder generator, named function's arguments, and more!
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...
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...
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...
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...
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...
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...
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...
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...
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...