{"record":{"id":"1416a5b49fdf595e","repo":"quickwit-oss/quickwit","slug":"structure-implement-deserialize-but-no-deserialize","errorCode":null,"errorMessage":"structure implement deserialize but no deserializer defined","messagePattern":"structure implement deserialize but no deserializer defined","errorType":"exception","errorClass":"proc-macro compile error","httpStatus":null,"severity":"error","filePath":"quickwit/quickwit-macros/src/lib.rs","lineNumber":200,"sourceCode":"                    return Err(Error::new(\n                        field_name.span(),\n                        \"structure implement serialize but no serializer defined\",\n                    ));\n                }\n                (false, Some(_)) => {\n                    return Err(Error::new(\n                        field_name.span(),\n                        \"structure doesn't implement serialize but a serializer is defined\",\n                    ));\n                }\n            }\n            match (de, field_config.get_try_from(&value)) {\n                (true, Some(conv)) => {\n                    try_from_conv.push(conv);\n                }\n                (false, None) => (),\n                (true, None) => {\n                    return Err(Error::new(\n                        field_name.span(),\n                        \"structure implement deserialize but no deserializer defined\",\n                    ));\n                }\n                (false, Some(_)) => {\n                    return Err(Error::new(\n                        field_name.span(),\n                        \"structure doesn't implement deserialize but a deserializer is defined\",\n                    ));\n                }\n            }\n        } else {\n            pass_through.push(field_name);\n            final_fields.push(field);\n            if let Some(ponct) = ponct {\n                final_fields.push_punct(ponct);\n            }\n        }","sourceCodeStart":182,"sourceCodeEnd":218,"githubUrl":"https://github.com/quickwit-oss/quickwit/blob/a39730c5cdcd1a4fe798403737ae293999ea21f8/quickwit/quickwit-macros/src/lib.rs#L182-L218","documentation":"In generate_proxy_struct, each field can declare a `try_from` (deserializer) conversion. If the struct implements Deserialize but a deserialized field has no `try_from` conversion defined, the macro cannot construct that field from the input and emits this error.","triggerScenarios":"The struct has a Deserialize impl/derive, and a field in the deserialization path lacks the required `try_from = ...` conversion in its serde_multikey field config.","commonSituations":"Adding a new field to a deserialized multikey struct without adding its `try_from` conversion; removing a conversion during refactoring.","solutions":["Define the deserializer conversion for the field (e.g. `try_from = ...`) in the field's serde_multikey config.","Or exclude the field from the deserialization path if it should not be deserialized."],"exampleFix":"// before\n#[serde_multikey(\n    fields(value)\n)]\n// after\n#[serde_multikey(\n    fields(value(try_from = parse_value))\n)]","handlingStrategy":"validation","validationCode":"// For every field in fields(...) of a Deserialize struct, ensure a `try_from` conversion exists:\n// #[serde_multikey(fields(value(try_from = parse_value)))]","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Whenever adding a field to a deserialized multikey struct, add its `try_from` conversion at the same time","Review the fields(...) config whenever the struct changes","Run cargo check frequently: the macro reports this at compile time"],"tags":["rust","proc-macro","serde","compile-time"],"backgroundTag":"missing-required-option","analyzedSha":"a39730c5cdcd1a4fe798403737ae293999ea21f8","analyzedAt":"2026-09-08T13:19:37.784Z","contentChangedAt":"2026-09-08T13:19:37.784Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}