Skip to main content

callback_ret_bytes

Function callback_ret_bytes 

Source
pub unsafe fn callback_ret_bytes(
    ptr: *mut u8,
    len: usize,
) -> Result<Vec<u8>, ForeignError>
Expand description

Adopt the byte run a vtable entry wrote to its out_ptr/out_len slots.

§Errors

Returns a MARSHAL_ERROR_CODE failure for a null pointer with a non-zero length.

§Safety

ptr must be null or a run of len bytes from {prefix}_alloc, which this adopts and frees.