The main feature of this release is better compatibility with using other derives on your config types, e.g. clap or typed-builder. See the added examples.
- Breaking: rename
PartialtoLayer(includingfrom_partial->from_layer,partial_attr->layer_attr, and more).- The new name more accurately reflects how the type is used most of the time. It is also less awkward to read/use as unlike "partial", "layer" is a proper noun.
- Breaking: require the (unresolved) symbol
Optionto be in scope and refer tostd::option::Optionwherederive(Config)is used.- While technically breaking, this is unlikely to affect anyone, since hardly any Rust code shadows
Option. - This change allows
confiqueto emit justOptionfor the partial type, which in turn enables you to use other derives with it (e.g.clap).
- While technically breaking, this is unlikely to affect anyone, since hardly any Rust code shadows
- Allow multiple
validateattributes on fields (all validations are performed). - Forward field docs to layer type. This is especially useful when using derives on the layer, which read the docs.
- Add examples
clapandbuilder, showing how you can derive useful traits for the layer type. - Add clarification about
ConfigvsDeserializeto the docs. - (Technically breaking) Remove implicit crate feature
serde_yaml. Useyamlinstead!