bon
bon copied to clipboard
Next-gen compile-time-checked builder generator, named function's arguments, and more!
Hey there, Bon is great but it still feels weird to write `.property(true)` for booleans and I feel that an option to shorten this usage would be a nice addition....
This new attribute can be placed on individual members or at the top level via `#[builder(on(_, overwritable)]`. It disables the compile-time check for overwriting already set members. For example with...
Closes #21 For anyone who wants to try out the changes here, you can do so using the following line in `Cargo.toml`: ```toml [dependencies] bon = { git = "https://github.com/elastio/bon",...
## Read this if you found this issue because you want to have builder syntax for methods in traits The design for this feature is rather hard and is yet...
Today we have an ability to configure some of the members as positional arguments to the starting function that creates the builder or to the finishing function that consumes the...
⚠️ There is no particular plan for a new major release right now! This issue exists just to record some thoughts on the things that we may potentially break in...
This is based on feature requests #24 and #69. Once we have a feature-complete builder derive we may add a feature to derive the getter/setter methods directly on the structs/enums....
This is based on the issue https://github.com/elastio/bon/issues/24 Once we have a feature-complete builder derive feature we may add a feature to derive the method `new()` with positional parameters for the...
In some cases, developers would like to share the `#[builder(...)]` configuration across all their methods in the impl block, or even across all impl blocks. Today, the users of `bon`...
This is based on a comment from @cksac in https://github.com/elastio/bon/issues/85#issuecomment-2343780384 It should look something like this. An additional config should enable the generation of a separate syntax for the builder...