Releases: colin-kiegel/rust-derive-builder
Releases · colin-kiegel/rust-derive-builder
v0.20.0
v0.13.1
v0.13.0
- Bump MSRV to 1.56.0
- Add
build_fn(error(validation_error = <bool>))
to disable generation ofValidationError
within the builder's error so thatalloc::string
is avoided. - Add feature
alloc
for controlling linking ofalloc
crate duringno_std
. This way users can useno_std
without providing aglobal_allocator
. - Make try-setters inherit
strip_option
fromsetter
fortry_setter
. Using these settings together previously caused a compile error #284
v0.12.0
v0.11.2
- Allow restricted visibility using
vis = "..."
for builders, build methods, setters, and fields #247 - Allow specifying the type of a builder field using
#[builder(field(type = "..."))]
#246 - Allow specifying how a builder field is built using
#[builder(field(build = "..."))]
#246 - Update
darling
,proc-macro2
,syn
, andquote
dependencies #250
v0.11.1
v0.11.0
- Support shorthand and long-form collection setters;
#[builder(setter(each = "..."))]
and#[builder(setter(each(name = "...")))]
#234 - Allow collection setters to be generic over
Into
using `#[builder(setter(each(name = "...", into)))] #234 and #214 - Allow specifying attributes for builder fields and setters using
#[builder_field_attr(...)]
and#[builder_setter_attr(...)]
#237
Note: This version didn't have anything that clearly required a minor version increase; however, given the amount of time and number of commits since last publication a conservative approach was taken.
v0.10.2
v0.10.1
v0.10.0
- Requires Rust 1.40.0 or newer (was 1.37.0) #169
- Logging feature is removed #177
- Type parameters no longer have the Default bound #178
- Make most of derive_builder_core private #189
- Add setter(each = "name") for extension of collection-like fields #199
This release changes how derive_builder
handles errors; instead of returning a string, a structured error is now returned from build
. This implements std::error::Error
, making it easy to use alongside libraries such as anyhow
, and it is replaceable, making it easy to drop in your library's own error instead. In addition, this approach means that builders no longer force any allocations, useful in no_std
contexts.