Releases: BrynCooke/buildstructor
Releases · BrynCooke/buildstructor
release-0.5.2
#103 Add docs to generated new when using #[derive(Builder].
0.5.1
#96 Fix associated type parameters:
#[buildstructor]
impl<T: MyTrait> Foo<T> {
#[builder]
pub fn new(foo: T, bar: T::Bar) -> Foo<T> {
Foo { foo, bar }
}
}
0.5.0
#81 Fix derive builder when used with module level visibility.
#77 Remove validation of visibility specifier.
#74 Automatically add #[cfg_attr(feature = "cargo-clippy", allow(too_many_arguments))]
to functions annotated with #[builder]
.
0.4.0
#69 Add the ability to override the visibility of generated builder.
#[derive(buildstructor::Builder)]
pub struct MyStruct {
simple: usize,
}
The generated constructor will have private visibility and the builder will be public.
#70 Add the ability to override the visibility of generated builder.
#3 Changed the storage of required but not yet supplied values to use MaybeUninit.
The tuple that represents the builder state stays the same memory layout regardless of if a field has been initialized or not.
This does not require any unsafe code!
0.3.2
#55 Fix impl with concrete types in generics where self is used in the return type.
#[buildstructor]
impl Foo<usize> {
#[builder]
fn bound_new(simple: usize) -> Self {
Self { simple }
}
}
Previously the generated builder method was not including concrete generic type. In this case usize.
0.3.1
#55 Fix impl with concrete types in generics.
#[buildstructor]
impl Foo<usize> {
#[builder]
fn bound_new(simple: usize) -> Foo<usize> {
Self { simple }
}
}
Previously the generated builder method was not including concrete generic type. In this case usize.
0.3.0
#55 Lifetimes are supported now.
#52 Add docs to generated builder. In addition, a type alias is introduced for the initial builder type so that:
- the docs looks nice
- the builder can be passed to a function (although this is of limited real world use).
#4 Use #[inline(always)] on generated code.