#[non_exhaustive]pub enum HeapType {
Show 15 variants
Func,
NoFunc,
Extern,
NoExtern,
Any,
Eq,
I31,
Struct,
ConcreteStruct(StructType),
Array,
ConcreteArray(ArrayType),
Exn,
NoExn,
None,
ConcreteFunc(FuncType),
}Expand description
The heap type of a reference: the abstract hierarchies (func/extern/any + bottoms) plus
concrete (defined) types, each carrying an engine-interned descriptor handle (FuncType/
StructType/ArrayType). Matches wasmtime::HeapType. (Boundary type — the serializable
internal form is canon::IrHeap.)
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Func
NoFunc
Extern
NoExtern
Any
Eq
I31
Struct
ConcreteStruct(StructType)
A concrete struct type.
Array
ConcreteArray(ArrayType)
A concrete array type.
Exn
NoExn
None
ConcreteFunc(FuncType)
A concrete function type.
Implementations§
Source§impl HeapType
impl HeapType
Sourcepub fn as_concrete_struct(&self) -> Option<&StructType>
pub fn as_concrete_struct(&self) -> Option<&StructType>
The concrete struct type if this is a ConcreteStruct heap type, else None.
Sourcepub fn unwrap_concrete_struct(&self) -> &StructType
pub fn unwrap_concrete_struct(&self) -> &StructType
The concrete struct type, panicking if this is not a concrete struct heap type.
Sourcepub fn as_concrete_array(&self) -> Option<&ArrayType>
pub fn as_concrete_array(&self) -> Option<&ArrayType>
The concrete array type if this is a ConcreteArray heap type, else None.
Sourcepub fn unwrap_concrete_array(&self) -> &ArrayType
pub fn unwrap_concrete_array(&self) -> &ArrayType
The concrete array type, panicking if this is not a concrete array heap type.
Sourcepub fn as_concrete_func(&self) -> Option<&FuncType>
pub fn as_concrete_func(&self) -> Option<&FuncType>
The concrete function type if this is a ConcreteFunc heap type, else None.
Sourcepub fn unwrap_concrete_func(&self) -> &FuncType
pub fn unwrap_concrete_func(&self) -> &FuncType
The concrete function type, panicking if this is not a concrete func heap type.
Trait Implementations§
impl Eq for HeapType
Source§impl From<StructType> for HeapType
impl From<StructType> for HeapType
Source§fn from(t: StructType) -> Self
fn from(t: StructType) -> Self
impl StructuralPartialEq for HeapType
Auto Trait Implementations§
impl Freeze for HeapType
impl RefUnwindSafe for HeapType
impl Send for HeapType
impl Sync for HeapType
impl Unpin for HeapType
impl UnsafeUnpin for HeapType
impl UnwindSafe for HeapType
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.