Skip to main content

callback_ret_string

Function callback_ret_string 

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

Adopt a string 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 or bytes that aren’t UTF-8.

§Safety

Same contract as callback_ret_bytes.