pub fn gen_opaque_constructor(
ctor: &ClientConstructorConfig,
type_name: &str,
core_import: &str,
constructor_attr: &str,
) -> StringExpand description
Generate a custom opaque-handle constructor from a ClientConstructorConfig.
Emits a pub fn new(params…) -> Result<Self, ErrType> method body suitable
for inclusion inside an impl TypeName { … } block.
constructor_attr— optional attribute line placed immediately before thepub fn newline (e.g."#[new]"for PyO3,"#[napi(constructor)]"for NAPI-RS, or""to emit no attribute).