Struct wasmedge_sys::TableType
source · pub struct TableType { /* private fields */ }
Expand description
Implementations§
source§impl TableType
impl TableType
sourcepub fn create(
elem_ty: RefType,
min: u32,
max: Option<u32>
) -> WasmEdgeResult<Self>
pub fn create(
elem_ty: RefType,
min: u32,
max: Option<u32>
) -> WasmEdgeResult<Self>
Creates a new TableType to be associated with the given limit range of the size and the reference type.
Arguments
-
elem_type
- The element type. -
min
- The initial size of the table to be created. -
max
- The maximum size of the table to be created.
Error
If fail to create a TableType, then an error is returned.
Example
ⓘ
let ty = TableType::create(WasmRefType::FuncRef, 10, Some(20)).expect("fail to create a TableType");
sourcepub fn as_ptr(&self) -> *const WasmEdge_TableTypeContext
pub fn as_ptr(&self) -> *const WasmEdge_TableTypeContext
Provides a raw pointer to the inner table type context.