/// Consumes the given raw table element value into a table element.
///
/// # Safety
///
/// This is unsafe as it will *not* clone any externref, leaving the reference count unchanged.
///
/// This should only be used if the raw pointer is no longer in use.
Consumes the given raw table element value into a table element.
Consumes the given raw table element value into a table element .
unsafe fn from_table_value(ty: TableElementType, ptr: usize) -> Self {
        match (ty, ptr) {
            (TableElementType::Func, 0) => Self::UninitFunc,
            (TableElementType::Func, ptr) => Self::FuncRef((ptr & FUNCREF_MASK) as _),
            (TableElementType::Extern, 0) => Self::ExternRef(None),
            (TableElementType::Extern, ptr) => {
                Self::ExternRef(Some(VMExternRef::from_raw(ptr as *mut u8)))
            }
        }
    }
unsafe fn from_table_value ( ty : TableElementType , ptr : usize ) -> Self { match ( ty , ptr ) { ( TableElementType :: Func , 0 ) => Self :: UninitFunc , ( TableElementType :: Func , ptr ) => Self :: FuncRef ( ( ptr & FUNCREF_MASK ) as _ ) , ( TableElementType :: Extern , 0 ) => Self :: ExternRef ( None ) , ( TableElementType :: Extern , ptr ) => { Self :: ExternRef ( Some ( VMExternRef :: from_raw ( ptr as * mut u8 ) ) ) } } }
Consumes the given raw table element value into a table element.
Consumes the given raw table element value into a table element .
ty
TableElementType
ptr
usize
safety
This is unsafe as it will *not* clone any externref, leaving the reference count unchanged.

This should only be used if the raw pointer is no longer in use.
This is unsafe as it will * not * clone any externref leaving the reference count unchanged . This should only be used if the raw pointer is no longer in use .