In rust why does combining a u128 struct with a u32 result in a 32 byte struct?
If I do this struct
Can I add common fields to different struct definitions in rust?
#[derive(Default, Serialize, Deserialize)] pub struct User { pub id: String, pub username: String, #[serde(rename(serialize = “accountGroupId”, deserialize = “accountGroupId”))] pub account_group_id: String, } #[derive(Default, Serialize, Deserialize)] pub struct Client { pub id: String, pub contact: String, } We need to add common fields such like “enable” to User & Client. Then we can use like […]