Vitalii Kryvenko
Vitalii Kryvenko
I see your point. Anyway, that's not a big deal =)
Maybe something like ```rust #[derive(Builder)] struct Example { #[builder(flag)] color: bool, } ``` It would generate three methods: - `color() -> true` - `no_color() -> false` - `set_color(value: bool)` I...
Alternatively, the `false` setter may just be omitted by default. Since having that many setters also complicates the API. I wonder if that'd really be a frequent use case for...
I've started work on the feature for custom method extensions of builder type and stable type state signature in https://github.com/elastio/bon/pull/145. See the usage shown in the PR description there for...
I'm revisiting the design for this yet again as part of the bigger `3.0` design effort. I propose to make this syntax sugar a bit more limited, but probably more...
Hi, thank you for sharing your ideas! > `#[builder(flag)] condition: Option,` I don't understand what the attribute `#[builder(flag)]` changes for members of type `Option`. Members of type `Option` already generate...
> My idea with the builder(flag) attribute on an optional value was that it could somehow "traverse" the Option allowing to use the variants of an enum as flags Aha,...
Btw, I just noticed, that the impl block with the `#[bon]` attribute can be avoided. In the next version of `bon` it will be possible to express such a builder...
`3.0.0-rc` version was published. I'll prepare a blog post for the release and switch it to `3.0.0` on November 13-th
I've published a `3.1` release of `bon` that adds [`#[builder(field)]`](https://bon-rs.com/reference/builder/member/field) annotation allowing you to define custom fields. This can be used in combination with custom methods to define special setters...