Struct wasmtime_environ::WasmSubType
source · pub struct WasmSubType {
pub is_final: bool,
pub supertype: Option<EngineOrModuleTypeIndex>,
pub composite_type: WasmCompositeType,
}
Expand description
A concrete, user-defined (or host-defined) Wasm type.
Fields§
§is_final: bool
Whether this type is forbidden from being the supertype of any other type.
supertype: Option<EngineOrModuleTypeIndex>
This type’s supertype, if any.
composite_type: WasmCompositeType
The array, function, or struct that is defined.
Implementations§
source§impl WasmSubType
impl WasmSubType
pub fn is_func(&self) -> bool
pub fn as_func(&self) -> Option<&WasmFuncType>
pub fn unwrap_func(&self) -> &WasmFuncType
pub fn is_array(&self) -> bool
pub fn as_array(&self) -> Option<&WasmArrayType>
pub fn unwrap_array(&self) -> &WasmArrayType
pub fn is_struct(&self) -> bool
pub fn as_struct(&self) -> Option<&WasmStructType>
pub fn unwrap_struct(&self) -> &WasmStructType
Trait Implementations§
source§impl Clone for WasmSubType
impl Clone for WasmSubType
source§fn clone(&self) -> WasmSubType
fn clone(&self) -> WasmSubType
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 WasmSubType
impl Debug for WasmSubType
source§impl<'de> Deserialize<'de> for WasmSubType
impl<'de> Deserialize<'de> for WasmSubType
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 WasmSubType
impl Display for WasmSubType
source§impl Hash for WasmSubType
impl Hash for WasmSubType
source§impl PartialEq for WasmSubType
impl PartialEq for WasmSubType
source§impl Serialize for WasmSubType
impl Serialize for WasmSubType
source§impl TypeTrace for WasmSubType
impl TypeTrace for WasmSubType
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 Eq for WasmSubType
impl StructuralPartialEq for WasmSubType
Auto Trait Implementations§
impl Freeze for WasmSubType
impl RefUnwindSafe for WasmSubType
impl Send for WasmSubType
impl Sync for WasmSubType
impl Unpin for WasmSubType
impl UnwindSafe for WasmSubType
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.