Skip to content

sgns::runtime::WasmResult

More...

#include <wasm_result.hpp>

Public Functions

Name
constexpr WasmResult(WasmSpan v)
constexpr WasmResult(WasmPointer ptr, WasmSize size)
WasmSpan combine() const
makes combined pointer-size result from address
bool operator==(const WasmResult & rhs) const

Public Attributes

Name
WasmPointer address
address of buffer result
WasmSize length
length of buffer result

Detailed Description

struct sgns::runtime::WasmResult;

Result of a call to a Runtime API wasm function is an i64 where first 32 bits are the address and next 32 bits are the size of the returned buffer.

Public Functions Documentation

function WasmResult

inline explicit constexpr WasmResult(
    WasmSpan v
)

function WasmResult

inline constexpr WasmResult(
    WasmPointer ptr,
    WasmSize size
)

function combine

inline WasmSpan combine() const

makes combined pointer-size result from address

Return: pointer-size uint64_t value

function operator==

inline bool operator==(
    const WasmResult & rhs
) const

Public Attributes Documentation

variable address

WasmPointer address = 0u;

address of buffer result

variable length

WasmSize length = 0u;

length of buffer result


Updated on 2026-03-04 at 13:10:43 -0800