Enum wasm_encoder::adapter::TypeRef
source · [−]pub enum TypeRef {
Instance(u32),
Module(u32),
Function(u32),
Table(TableType),
Memory(MemoryType),
Global(GlobalType),
}
Expand description
Represents a reference to a type definition.
Variants
Instance(u32)
The definition is an instance.
The value is an index in the types index space. The index must be to an instance type.
Module(u32)
The definition is a module.
The value is an index in the types index space. The index must be to a module type.
Function(u32)
The definition is a core wasm function.
The value is an index in the types index space. The index must be to a function type.
Table(TableType)
The definition is a core wasm table.
Memory(MemoryType)
The definition is a core wasm memory.
Global(GlobalType)
The definition is a core wasm global.
Trait Implementations
sourceimpl From<GlobalType> for TypeRef
impl From<GlobalType> for TypeRef
sourcefn from(t: GlobalType) -> Self
fn from(t: GlobalType) -> Self
Performs the conversion.
sourceimpl From<MemoryType> for TypeRef
impl From<MemoryType> for TypeRef
sourcefn from(t: MemoryType) -> Self
fn from(t: MemoryType) -> Self
Performs the conversion.
impl Copy for TypeRef
impl Eq for TypeRef
impl StructuralEq for TypeRef
impl StructuralPartialEq for TypeRef
Auto Trait Implementations
impl RefUnwindSafe for TypeRef
impl Send for TypeRef
impl Sync for TypeRef
impl Unpin for TypeRef
impl UnwindSafe for TypeRef
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more