Closed n3wtron closed 2 years ago
This was previously discussed in #170. I am still not inclined to pursue this, as Rust provides efficient struct-update syntax in the following form:
let user_with_alt_id = User {
id: "...".into(),
..old_user
};
Additionally, there are too many open questions about the exact behavior of such a method to generate an implementation - including, but not limited to:
Given the number and severity of questions that don't have clear answers, it's best for authors wishing to provide this functionality to hand-build this method themselves for the structs where there's a good reason for it.
Thank you very much for the fast reply and sorry for the duplication.
It would be great to have the ability to create a builder from the related struct. Something like