wasmedge_sys::ffi

Function WasmEdge_MemoryInstanceGetData

Source
pub unsafe extern "C" fn WasmEdge_MemoryInstanceGetData(
    Cxt: *const WasmEdge_MemoryInstanceContext,
    Data: *mut u8,
    Offset: u32,
    Length: u32,
) -> WasmEdge_Result
Expand description

Copy the data to the output buffer from a memory instance.

\param Cxt the WasmEdge_MemoryInstanceContext. \param [out] Data the result data buffer of copying destination. \param Offset the data start offset in the memory instance. \param Length the requested data length. If the Offset + Length is larger than the data size in the memory instance, this function will failed.

\returns WasmEdge_Result. Call WasmEdge_ResultGetMessage for the error message.