wasmedge_sys::ffi

Function WasmEdge_BytesCreate

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

Creation of the WasmEdge_Bytes with the buffer and its length.

The caller owns the object and should call WasmEdge_BytesDelete to destroy it.

\param Buf the buffer to copy into the WasmEdge_Bytes object. \param Len the buffer length.

\returns bytes object. Length will be 0 and Buf will be NULL if failed or the input buffer is a NULL.