Skip to main content

WasmEdge_BytesWrap

Function WasmEdge_BytesWrap 

Source
pub unsafe extern "C" fn WasmEdge_BytesWrap(
    Buf: *const u8,
    Len: u32,
) -> WasmEdge_Bytes
Expand description

Create a WasmEdge_Bytes that wraps the buffer.

This function creates a WasmEdge_Bytes object which wraps the input buffer. The caller should guarantee the lifetime of the input buffer, and should NOT call the WasmEdge_BytesDelete.

\param Buf the buffer to wrap to the WasmEdge_Bytes object. \param Len the buffer length.

\returns bytes object referring to the input buffer with its length.