Skip to main content

lift_callback_param

Function lift_callback_param 

Source
pub unsafe fn lift_callback_param<C: CallbackInterface + ?Sized>(
    ctx: *mut c_void,
    vtable: *const C::Vtable,
    name: &str,
) -> Result<Arc<C>, FfiError>
Expand description

Adopt a callback-interface parameter’s (ctx, vtable) pair.

§Errors

Returns a marshalling error for a null or too-small vtable.

§Safety

Same contract as ForeignCallback::from_raw.