Skip to content

v0.4.0

Latest

Choose a tag to compare

@LukasKalbertodt LukasKalbertodt released this 27 Oct 13:27
63afcdc

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 Partial to Layer (including from_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 Option to be in scope and refer to std::option::Option where derive(Config) is used.
    • While technically breaking, this is unlikely to affect anyone, since hardly any Rust code shadows Option.
    • This change allows confique to emit just Option for the partial type, which in turn enables you to use other derives with it (e.g. clap).
  • Allow multiple validate attributes 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 clap and builder, showing how you can derive useful traits for the layer type.
  • Add clarification about Config vs Deserialize to the docs.
  • (Technically breaking) Remove implicit crate feature serde_yaml. Use yaml instead!