rust-typed-builder
rust-typed-builder copied to clipboard
Compile-time type-checked builder derive
I just started using this crate today and love it. The only thing I wish it had is a way to define the setter function for specific fields. For instance...
In #22 we added traits for extending the builder type, but using several of them together (a common usecase for extending the builder type) can become very verbose: ```rust #[derive(TypedStruct)]...
With #21 we want to convert all the builder type's generic parameters to a single tuple of types. Here we want to add traits for it. Say we have: ```rust...
Thanks for your work on this crate — it's been super useful for me in several projects. A project called `watt` has been released recently (https://github.com/dtolnay/watt), which claims to decrease...
when generating a builder for a struct like ```rust struct Foo { foo: i32, bar: i32 } ``` I'd like to be able to add my own custom derives to...
### Description Here is the current documentation for the `field_defaults(...)` attribute on `TypedBuilder` structs. > is structured like the #[builder(...)] attribute you can put on the fields and sets default...
per https://github.com/idanarye/rust-typed-builder/issues/82 could we make this one step easier like `derive-builder` does by allowing `setter(into)` for the entire struct? Then, so long as `Into` is implemented for any field it...
I currently have the following builder: ```rust struct MyStruct { a: Option, } ``` I want to be able to only call `build` if a **OR** b is provided, but...
Minimal example reproducing the error: ```rust mod foo { use typed_builder::TypedBuilder; struct Bar; #[derive(TypedBuilder)] pub struct Foo { #[builder(setter(transform = |x: u32| Bar))] foo: Bar, } } use foo::Foo; fn...
I need some kind of nice API wrapper of a SQL query builder for multiple dynamically constructed queries I use. They are similar but quite huge, therefore I want a...