5 ms·
The contents of each variant don't really matter here. The tag represents the variant, not the type contained inside of it. The Serde equivalent here would be:
by Nullabillity 3y ago
The contents of each variant don't really matter here. The tag represents the variant, not the type contained inside of it. The Serde equivalent here would be:
#[derive(Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub enum Response {
Success(serde_json::Value),
Error(serde_json::Value),
}