Kagome
Polkadot Runtime Engine in C++17
kagome::runtime::PtrSize Struct Reference

#include <ptr_size.hpp>

Collaboration diagram for kagome::runtime::PtrSize:

Public Member Functions

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

Public Attributes

WasmPointer ptr = 0u
 address of buffer More...
 
WasmSize size = 0u
 length of buffer More...
 

Detailed Description

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.

Definition at line 18 of file ptr_size.hpp.

Constructor & Destructor Documentation

constexpr kagome::runtime::PtrSize::PtrSize ( )
inline

Definition at line 19 of file ptr_size.hpp.

kagome::runtime::PtrSize::PtrSize ( WasmSpan  v)
inlineexplicit

Definition at line 21 of file ptr_size.hpp.

constexpr kagome::runtime::PtrSize::PtrSize ( WasmPointer  ptr,
WasmSize  size 
)
inline

Definition at line 25 of file ptr_size.hpp.

Member Function Documentation

constexpr WasmSpan kagome::runtime::PtrSize::combine ( ) const
inline

makes combined pointer-size result from address

Returns
pointer-size uint64_t value

Definition at line 31 of file ptr_size.hpp.

bool kagome::runtime::PtrSize::operator== ( const PtrSize rhs) const
inline

Definition at line 36 of file ptr_size.hpp.

Member Data Documentation

WasmPointer kagome::runtime::PtrSize::ptr = 0u

address of buffer

Definition at line 40 of file ptr_size.hpp.

WasmSize kagome::runtime::PtrSize::size = 0u

length of buffer

Definition at line 41 of file ptr_size.hpp.


The documentation for this struct was generated from the following file: