Is there any crate or functionality that allows me to copy the fields from another structure?
Example
//Crate a
struct Product{
name:String,
sku:String,
amount: i32,
}
//Crate b
#[derive(copy_fields_from="a::Product", InputObject)]
struct ProductApi
I have to expose through an api several objects that are in another create using
"# [derive (InputObject)]
", for that I have to duplicate all the structures of the other box, is it possible to copy the fields of another structure? example #[derive(copy_fields_from="a::Product")]