github idanarye/rust-typed-builder v0.5.0
0.5.0 - 2020-01-25

latest releases: v0.20.1, v0.20.0, v0.19.1...
one day ago

Changed

  • [BREAKING] Move doc and skip into a subsetting named setter(...).
    This means that #[builder(doc = "...")], for example, should now be written
    as #[builder(setter(doc = "..."))].
  • [BREAKING] Setter arguments by default are no longer automatically
    converted to the target type with into(). If you want to automatically
    convert them, use #[builder(setter(into))]. This new default enables rustc
    inference for generic types and proper integer literal type detection.
  • Improve build errors for incomplete .build() and repeated setters, by
    creating faux methods with deprecation warnings.

Added

  • #[builder(setter(strip_option))] for making setters for Option fields
    automatically wrap the argument with Some(...). Note that this is a weaker
    conversion than #[builder(setter(into))], and thus can still support type
    inference and integer literal type detection.

Removed

  • [BREAKING] Removed the default_code setting (#[builder(default_code = "...")]) because it is no longer required now that Rust and syn support
    arbitrary expressions in attributes.

Don't miss a new rust-typed-builder release

NewReleases is sending notifications on new releases.