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
Available on crate feature ffi
only.
pub fn as_ptr(&self) -> *const WasmEdge_TableTypeContext
ffi
only.Provides a raw pointer to the inner table type context.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for TableType
impl Send for TableType
impl Sync for TableType
impl Unpin for TableType
impl UnwindSafe for TableType
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more