unsafe fn clone_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::clone_from_raw(ptr as *mut u8)))
            }
        }
    }
/// Clones a table element from the underlying table element.
///
/// # Safety
///
/// This is unsafe as it will clone any externref, incrementing the reference count.
Clones a table element from the underlying table element.
Clones a table element from the underlying table element .
unsafe fn clone_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::clone_from_raw(ptr as *mut u8)))
            }
        }
    }
unsafe fn clone_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 :: clone_from_raw ( ptr as * mut u8 ) ) ) } } }
Clones a table element from the underlying table element.
Clones a table element from the underlying table element .
ty
TableElementType
ptr
usize
ty
TableElementType
ptr
usize
safety
This is unsafe as it will clone any externref, incrementing the reference count.
This is unsafe as it will clone any externref incrementing the reference count .