Vitalii Kryvenko

Results 283 comments of Vitalii Kryvenko

Here are some more thoughts about this. The proposed `#[bon(transparent)]` may be confusing. Users may mistakenly think that this attribute can be used to disable automatic `Into` conversions or some...

The term `required` is a bit overloaded. There are two parts of "being required". 1. The setter method must be called during building (exhaustiveness). 2. There is no default value...

On the second thought `#[builder(required)]` looks bearable when paired with `#[builder(default)]`. So the proposed behavior is the following: ```rust struct Example { #[builder(required)] arg1: Option, // A bit confusing, but...

Hi @musjj, I've already revisited this issue and design a bit on the background while working on #145. To me, the feature of having exhaustiveness in the builder (where you...

I see, thank you for the feedback! I'll just postpone the `#[builder(explicit)]` for now, and wait for someone with a use case for it. Regarding the top-level config, it does...

@adrian-budau I see the problem, thank you for describing it. I have a followup question. Are these types annotated with `prost::Message` written manually by you or are they generated by...

> I also find it weird that the `maybe` setters remain active in a universe with `#[builder(explicit)]` and require explicit `setters(option_fn(disabled))`. This is why I think `#[builder(explicit)]` is not worth...

Added an initial implementation of `#[builder(on(_, transparent))]`: https://github.com/elastio/bon/pull/155. Merged into master. Pending documentation update in a separate PR and 3.0 release. 3.0 progress is tracked at https://github.com/elastio/bon/issues/156

The PR https://github.com/elastio/bon/pull/157 added support for `#[builder(with = Some)]`. So all the features discussed here are in master. You may subscribe to the 3.0 checklist issue https://github.com/elastio/bon/issues/156. I'll close it...

Small update, I decided to do a last-minute change before the release of this feature as part of 3.0. I'll use the term `#[builder(required)]` instead of `#[builder(transparent)]`, because it's so...