pub fn create(mut ty: TableType) -> WasmEdgeResult<Self> {
        let ctx = unsafe { wasmedge::WasmEdge_TableInstanceCreate(ty.inner.0) };
        ty.inner.0 = std::ptr::null_mut();
        match ctx.is_null() {
            true => Err(WasmEdgeError::Table(TableError::Create)),
            false => Ok(Table {
                inner: InnerTable(ctx),
                registered: false,
            }),
        }
    }
/// Creates a new [`Table`] to be associated with the given element type and the size.
///
/// # Arguments
///
/// - `ty` specifies the type of the new [`Table`].
///
/// # Error
///
/// If fail to create a [`Table`], then an error is returned.
///
/// # Example
///
/// ```
/// use wasmedge_sys::{RefType, TableType, Table};
/// // create a TableType instance
/// let ty = TableType::create(RefType::FuncRef, 10..=20).expect("fail to create a TableType");
///
/// // create a Table instance
/// let table = Table::create(ty).expect("fail to create a Table");
/// ```
Creates a new [`Table`] to be associated with the given element type and the size.
Creates a new [ ` Table ` ] to be associated with the given element type and the size .
pub fn create(mut ty: TableType) -> WasmEdgeResult<Self> {
        let ctx = unsafe { wasmedge::WasmEdge_TableInstanceCreate(ty.inner.0) };
        ty.inner.0 = std::ptr::null_mut();
        match ctx.is_null() {
            true => Err(WasmEdgeError::Table(TableError::Create)),
            false => Ok(Table {
                inner: InnerTable(ctx),
                registered: false,
            }),
        }
    }
pub fn create ( mut ty : TableType ) -> WasmEdgeResult < Self > { let ctx = unsafe { wasmedge :: WasmEdge_TableInstanceCreate ( ty . inner . 0 ) } ; ty . inner . 0 = std :: ptr :: null_mut ( ) ; match ctx . is_null ( ) { true => Err ( WasmEdgeError :: Table ( TableError :: Create ) ) , false => Ok ( Table { inner : InnerTable ( ctx ) , registered : false , } ) , } }
Creates a new [`Table`] to be associated with the given element type and the size.
Creates a new [ ` Table ` ] to be associated with the given element type and the size .
ty
TableType
specifies the type of the new [`Table`].
specifies the type of the new [ ` Table ` ] .
error
If fail to create a [`Table`], then an error is returned.
If fail to create a [ ` Table ` ] then an error is returned .
example
```
use wasmedge_sys::{RefType, TableType, Table};
create a TableType instance
let ty = TableType::create(RefType::FuncRef, 10..=20).expect("fail to create a TableType").

create a Table instance
let table = Table::create(ty).expect("fail to create a Table");
```
` ` ` use wasmedge_sys :: { RefType TableType Table } ; create a TableType instance let ty = TableType :: create ( RefType :: FuncRef 10 .. = 20 ) . expect ( " fail to create a TableType " ) . create a Table instance let table = Table :: create ( ty ) . expect ( " fail to create a Table " ) ; ` ` `