DioxusLabs/dioxus · error · syn::Error
Invalid Result type
Error message
Invalid Result type
What it means
Error "Invalid Result type" thrown in DioxusLabs/dioxus.
Source
Thrown at packages/manganis/manganis-macro/src/ffi.rs:99
return Err(syn::Error::new(ty.span(), "Invalid Option type"));
}
"Result" => {
if let syn::PathArguments::AngleBracketed(args) = &segment.arguments {
let mut iter = args.args.iter();
if let (
Some(syn::GenericArgument::Type(ok_ty)),
Some(syn::GenericArgument::Type(err_ty)),
) = (iter.next(), iter.next())
{
let ok_type = Self::from_type(ok_ty)?;
let err_type = Self::from_type(err_ty)?;
return Ok(ForeignType::Result(
Box::new(ok_type),
Box::new(err_type),
));
}
}
return Err(syn::Error::new(ty.span(), "Invalid Result type"));
}
_ => {
// Assume it's an opaque type reference
return Ok(ForeignType::OpaqueRef(segment.ident.clone()));
}
}
}
Err(syn::Error::new(ty.span(), "Unsupported type path"))
}
Type::Reference(type_ref) => {
if let Type::Path(path) = &*type_ref.elem {
if path.path.is_ident("str") {
return Ok(ForeignType::StrRef);
}
// Check for &OpaqueType
if path.path.segments.len() == 1 {
return Ok(ForeignType::OpaqueRef(path.path.segments[0].ident.clone()));
}View on GitHub (pinned to 393d190a80)
When it happens
Trigger: Thrown at packages/manganis/manganis-macro/src/ffi.rs:99 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of DioxusLabs/dioxus@393d190a80 (2026-08-16).
Data as JSON: /api/errors/a22fb8d0f9032168.
Report an issue: GitHub.