I just discovered derive_builder, and for me it seems a common use case to initialize a builder with an existing struct before modifying some fields, like the struct update syntax mentioned here.
E.g., is a syntax like
let s1: Struct = […];
// …
StructBuilder::from_struct(s1).field1(…).field2(…);
analogous to pure rust
let s1: Struct = […];
// …
let s2 = Struct {
field1: […],
field2: […],
..s1
}
already possible or planned for the future?
Thanks for your time!
PS: I am quite new to rust, maybe I am overlooking something.
Hello,
I just discovered derive_builder, and for me it seems a common use case to initialize a builder with an existing struct before modifying some fields, like the struct update syntax mentioned here.
E.g., is a syntax like
analogous to pure rust
already possible or planned for the future?
Thanks for your time!
PS: I am quite new to rust, maybe I am overlooking something.