Struct wasmtime_environ::WasmRefType
source · pub struct WasmRefType {
pub nullable: bool,
pub heap_type: WasmHeapType,
}
Expand description
WebAssembly reference type – equivalent of wasmparser
’s RefType
Fields§
§nullable: bool
Whether or not this reference is nullable.
heap_type: WasmHeapType
The heap type that this reference contains.
Implementations§
source§impl WasmRefType
impl WasmRefType
sourcepub const EXTERNREF: WasmRefType = _
pub const EXTERNREF: WasmRefType = _
Shorthand for externref
sourcepub const FUNCREF: WasmRefType = _
pub const FUNCREF: WasmRefType = _
Shorthand for funcref
sourcepub fn is_vmgcref_type(&self) -> bool
pub fn is_vmgcref_type(&self) -> bool
Is this a type that is represented as a VMGcRef
?
sourcepub fn is_vmgcref_type_and_not_i31(&self) -> bool
pub fn is_vmgcref_type_and_not_i31(&self) -> bool
Is this a type that is represented as a VMGcRef
and is additionally
not an i31
?
That is, is this a a type that actually refers to an object allocated in a GC heap?
Trait Implementations§
source§impl Clone for WasmRefType
impl Clone for WasmRefType
source§fn clone(&self) -> WasmRefType
fn clone(&self) -> WasmRefType
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for WasmRefType
impl Debug for WasmRefType
source§impl<'de> Deserialize<'de> for WasmRefType
impl<'de> Deserialize<'de> for WasmRefType
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Display for WasmRefType
impl Display for WasmRefType
source§impl Hash for WasmRefType
impl Hash for WasmRefType
source§impl PartialEq for WasmRefType
impl PartialEq for WasmRefType
source§impl Serialize for WasmRefType
impl Serialize for WasmRefType
source§impl TypeTrace for WasmRefType
impl TypeTrace for WasmRefType
source§fn trace_mut<F, E>(&mut self, func: &mut F) -> Result<(), E>
fn trace_mut<F, E>(&mut self, func: &mut F) -> Result<(), E>
Visit each edge, mutably. Read more
source§fn trace_engine_indices<F, E>(&self, func: &mut F) -> Result<(), E>
fn trace_engine_indices<F, E>(&self, func: &mut F) -> Result<(), E>
Trace all
VMSharedTypeIndex
edges, ignoring other edges.source§fn canonicalize_for_runtime_usage<F>(&mut self, module_to_engine: &mut F)
fn canonicalize_for_runtime_usage<F>(&mut self, module_to_engine: &mut F)
Canonicalize
self
by rewriting all type references inside self
from
module-level interned type indices to engine-level interned type
indices. Read moresource§fn is_canonicalized_for_runtime_usage(&self) -> bool
fn is_canonicalized_for_runtime_usage(&self) -> bool
Is this type canonicalized for runtime usage?
source§fn canonicalize_for_hash_consing<F>(
&mut self,
rec_group_range: Range<ModuleInternedTypeIndex>,
module_to_engine: &mut F,
)
fn canonicalize_for_hash_consing<F>( &mut self, rec_group_range: Range<ModuleInternedTypeIndex>, module_to_engine: &mut F, )
Canonicalize
self
by rewriting all type references inside self
from
module-level interned type indices to either engine-level interned type
indices or recgroup-relative indices. Read moresource§fn is_canonicalized_for_hash_consing(&self) -> bool
fn is_canonicalized_for_hash_consing(&self) -> bool
Is this type canonicalized for hash consing?
impl Copy for WasmRefType
impl Eq for WasmRefType
impl StructuralPartialEq for WasmRefType
Auto Trait Implementations§
impl Freeze for WasmRefType
impl RefUnwindSafe for WasmRefType
impl Send for WasmRefType
impl Sync for WasmRefType
impl Unpin for WasmRefType
impl UnwindSafe for WasmRefType
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
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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
Compare self to
key
and return true
if they are equal.