pub fn create(elem_ty: RefType, limit: RangeInclusive<u32>) -> WasmEdgeResult<Self> {
        let ctx = unsafe {
            wasmedge::WasmEdge_TableTypeCreate(
                wasmedge::WasmEdge_RefType::from(elem_ty),
                wasmedge::WasmEdge_Limit::from(limit),
            )
        };
        match ctx.is_null() {
            true => Err(WasmEdgeError::TableTypeCreate),
            false => Ok(Self {
                inner: InnerTableType(ctx),
                registered: false,
            }),
        }
    }
/// Creates a new [`TableType`] to be associated with the given limit range of the size and the reference type.
///
/// # Arguments
///
/// - `elem_type` specifies the element type.
///
/// - `limit` specifies a range of the table size. The upper bound for a `limit` is `u32::MAX`.
///
/// # Error
///
/// If fail to create a [`TableType`], then an error is returned.
///
/// # Example
///
/// ```ignore
/// let ty = TableType::create(RefType::FuncRef, 10..=20).expect("fail to create a TableType");
/// ```
///
Creates a new [`TableType`] to be associated with the given limit range of the size and the reference type.
Creates a new [ ` TableType ` ] to be associated with the given limit range of the size and the reference type .
pub fn create(elem_ty: RefType, limit: RangeInclusive<u32>) -> WasmEdgeResult<Self> {
        let ctx = unsafe {
            wasmedge::WasmEdge_TableTypeCreate(
                wasmedge::WasmEdge_RefType::from(elem_ty),
                wasmedge::WasmEdge_Limit::from(limit),
            )
        };
        match ctx.is_null() {
            true => Err(WasmEdgeError::TableTypeCreate),
            false => Ok(Self {
                inner: InnerTableType(ctx),
                registered: false,
            }),
        }
    }
pub fn create ( elem_ty : RefType , limit : RangeInclusive < u32 > ) -> WasmEdgeResult < Self > { let ctx = unsafe { wasmedge :: WasmEdge_TableTypeCreate ( wasmedge :: WasmEdge_RefType :: from ( elem_ty ) , wasmedge :: WasmEdge_Limit :: from ( limit ) , ) } ; match ctx . is_null ( ) { true => Err ( WasmEdgeError :: TableTypeCreate ) , false => Ok ( Self { inner : InnerTableType ( ctx ) , registered : false , } ) , } }
Creates a new [`TableType`] to be associated with the given limit range of the size and the reference type.
Creates a new [ ` TableType ` ] to be associated with the given limit range of the size and the reference type .
elem_ty
RefType
limit
RangeInclusive<u32>
specifies a range of the table size. The upper bound for a `limit` is `u32::MAX`.
specifies a range of the table size . The upper bound for a ` limit ` is ` u32 :: MAX ` .
elem_type
specifies the element type.
specifies the element type .
error
If fail to create a [`TableType`], then an error is returned.
If fail to create a [ ` TableType ` ] then an error is returned .
example
```ignore
let ty = TableType::create(RefType::FuncRef, 10..=20).expect("fail to create a TableType");
```
` ` ` ignore let ty = TableType :: create ( RefType :: FuncRef 10 .. = 20 ) . expect ( " fail to create a TableType " ) ; ` ` `