{"record":{"id":"5f2a32a6c07e8c1e","repo":"DioxusLabs/dioxus","slug":"only-type-and-function-declarations-are-supported","errorCode":null,"errorMessage":"Only type and function declarations are supported in FFI blocks","messagePattern":"Only type and function declarations are supported in FFI blocks","errorType":"validation","errorClass":"syn::Error","httpStatus":null,"severity":"error","filePath":"packages/manganis/manganis-macro/src/ffi.rs","lineNumber":318,"sourceCode":"                ));\n            }\n        };\n\n        let mut types = Vec::new();\n        let mut functions = Vec::new();\n\n        for item in &item.items {\n            match item {\n                ForeignItem::Type(ty) => {\n                    types.push(ForeignTypeDecl {\n                        name: ty.ident.clone(),\n                    });\n                }\n                ForeignItem::Fn(func) => {\n                    functions.push(ForeignFunctionDecl::from_foreign_fn(func)?);\n                }\n                _ => {\n                    return Err(syn::Error::new(\n                        item.span(),\n                        \"Only type and function declarations are supported in FFI blocks\",\n                    ));\n                }\n            }\n        }\n\n        Ok(Self {\n            source_path,\n            abi,\n            types,\n            functions,\n        })\n    }\n\n    /// Generate all the code\n    pub fn generate(&self) -> TokenStream2 {\n        match self.abi {","sourceCodeStart":300,"sourceCodeEnd":336,"githubUrl":"https://github.com/DioxusLabs/dioxus/blob/393d190a801ccb441d41923e232289b4f8a5c669/packages/manganis/manganis-macro/src/ffi.rs#L300-L336","documentation":"Error \"Only type and function declarations are supported in FFI blocks\" thrown in DioxusLabs/dioxus.","triggerScenarios":"Thrown at packages/manganis/manganis-macro/src/ffi.rs:318 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"393d190a801ccb441d41923e232289b4f8a5c669","analyzedAt":"2026-08-16T11:27:45.815Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}