Enum wasmparser::types::CoreType
source · pub enum CoreType {
Sub(SubType),
Module(ModuleType),
}
Expand description
A core WebAssembly type, in the core WebAssembly types index space.
Variants§
Sub(SubType)
A sub type.
Module(ModuleType)
A module type.
Does not actually appear in core Wasm at the moment. Only used for the core types index space within components.
Implementations§
source§impl CoreType
impl CoreType
sourcepub fn unwrap_sub(&self) -> &SubType
pub fn unwrap_sub(&self) -> &SubType
Get the underlying SubType
or panic.
sourcepub fn unwrap_func(&self) -> &FuncType
pub fn unwrap_func(&self) -> &FuncType
Get the underlying FuncType
within this SubType
or panic.
sourcepub fn unwrap_module(&self) -> &ModuleType
pub fn unwrap_module(&self) -> &ModuleType
Get the underlying ModuleType
or panic.
Auto Trait Implementations§
impl Freeze for CoreType
impl RefUnwindSafe for CoreType
impl Send for CoreType
impl Sync for CoreType
impl Unpin for CoreType
impl UnwindSafe for CoreType
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