In a PR elastio/elastio#6680 it became clear that because Config is marked non_exhaustive, the Config struct can't be initialized the normal way. Instead an ugly mut was used, so the Default() struct could be permuted with the appropriate config options.
This works fine but it's not particularly idiomatic or pleasant. A builder should be added for Config so that this type can be constructed without mutable state, while retaining the non_exhaustive attribute that is important for future flexibility.
In a PR elastio/elastio#6680 it became clear that because
Configis markednon_exhaustive, theConfigstruct can't be initialized the normal way. Instead an uglymutwas used, so theDefault()struct could be permuted with the appropriate config options.This works fine but it's not particularly idiomatic or pleasant. A builder should be added for
Configso that this type can be constructed without mutable state, while retaining thenon_exhaustiveattribute that is important for future flexibility.