write_length_prefixed

Function write_length_prefixed 

Source
pub unsafe fn write_length_prefixed(
    data: &[u8],
    allocate_fn: extern "C" fn(i32) -> *mut u8,
) -> *mut u8
Expand description

Write a length-prefixed value.

Returns a pointer to the allocated memory (caller must deallocate).

ยงSafety

The returned pointer must be deallocated by the plugin.