derive_builder 0.20.2

Rust macro to automatically implement the builder pattern for arbitrary structs.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
error[E0277]: the trait bound `N: Popular` is not satisfied
  --> tests/compile-fail/custom_error_generic_missing_bound.rs:17:31
   |
17 | #[builder(build_fn(validate = "check_person", error = "Error<N>"))]
   |                               ^^^^^^^^^^^^^^ the trait `Popular` is not implemented for `N`
   |
note: required by a bound in `check_person`
  --> tests/compile-fail/custom_error_generic_missing_bound.rs:34:20
   |
34 | fn check_person<N: Popular + Clone>(builder: &PersonBuilder<N>) -> Result<(), Error<N>> {
   |                    ^^^^^^^ required by this bound in `check_person`
help: consider restricting type parameter `N`
   |
18 | struct Person<N: Popular> {
   |                +++++++++