Changed
- [BREAKING] Move
doc
andskip
into a subsetting namedsetter(...)
.
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 withinto()
. 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 forOption
fields
automatically wrap the argument withSome(...)
. 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 andsyn
support
arbitrary expressions in attributes.