Skip to main content

lift_buffer_param

Function lift_buffer_param 

Source
pub unsafe fn lift_buffer_param<T: BufferValue>(
    ptr: *const u8,
    len: usize,
    name: &str,
) -> Result<T, FfiError>
Expand description

Decode a value-buffer parameter (a record, rich enum, optional, list, or map), adopting any object tokens it carries.

§Errors

Returns a marshalling error for null with a non-zero length or a malformed buffer.

§Safety

Same contract as lift_slice_param, plus that of decode_value for the buffer’s object tokens.