Appreciate this might be quite difficult to do:
If you want to pass around a builder you have to specify the state of the builder:
#[bon::builder]
pub struct T {
a: usize,
b: usize
}
fn a() -> TBuilder<(bon::private::Set<usize>, bon::private::Set<usize>)> {
T::builder()
.a(1)
.b(2)
}
let var = a1();
var.build();
let var = a2().b(2);
var.build();
For complete structs it would make sense to type alias completeness to
type TBuilderValid = (bon::private::Set<usize>, bon::private::Set<usize>);
However what would be really useful would be some generic way of passing incomplete builders around.
A note for the community from the maintainers
Please vote on this issue by adding a 👍 reaction to help the maintainers with prioritizing it. You may add a comment describing your real use case related to this issue for us to better understand the problem domain.
Appreciate this might be quite difficult to do:
If you want to pass around a builder you have to specify the state of the builder:
For complete structs it would make sense to type alias completeness to
However what would be really useful would be some generic way of passing incomplete builders around.
A note for the community from the maintainers
Please vote on this issue by adding a 👍 reaction to help the maintainers with prioritizing it. You may add a comment describing your real use case related to this issue for us to better understand the problem domain.