diff --git a/crates/idfoto-core/src/item_types/mod.rs b/crates/idfoto-core/src/item_types/mod.rs index eb6d2d1..f8a6e22 100644 --- a/crates/idfoto-core/src/item_types/mod.rs +++ b/crates/idfoto-core/src/item_types/mod.rs @@ -35,6 +35,9 @@ pub enum ItemType { Totp, } +// INVARIANT: no *Core struct may have a field serialized as "type" — +// that key is reserved for serde's internal tag. Use "kind" for +// type-discriminant fields within core structs (CardKind, TotpKind). #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(tag = "type", rename_all = "snake_case")] pub enum ItemCore {