Skip to content

Conversation

@LonerDan
Copy link

Changes the way Config is constructed by introducing helper struct ConfigBuilder, which follows the builder pattern. This enables more ergonomic function call chaining, while still preserving the option to call them one by one as previously.

Based on this and this, the variant consuming and producing mutable references was chosen, since it allows both ergonomic function call chaining and manually calling individual functions, which is required in case of values set conditionally.
As a side effect, this also allows constructing multiple Configs from the same builder.

Changes the way `Config` is contructed by introducing helper struct `ConfigBuilder`, which follows the builder pattern. This enables more ergonomic function call chaining, while still preserving the option to call them one by one as previously.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant