pub fn gen_unimplemented_body(
return_type: &TypeRef,
fn_name: &str,
has_error: bool,
cfg: &RustBindingConfig<'_>,
params: &[ParamDef],
opaque_types: &AHashSet<String>,
) -> StringExpand description
Generate a compilable body for functions that can’t be auto-delegated.
Returns a default value or error instead of todo!() which would panic.
opaque_types is the set of opaque type names (Arc-wrapped). Opaque types do not
implement Default, so returning Default::default() for their Named return types
would fail to compile. For those cases a todo!() body is emitted instead.