pub enum ExternType {
Func(FuncType),
Memory(MemoryType),
Global(GlobalType),
Table(TableType),
Tag(TagType),
}Expand description
The type of an importable/exportable external item.
Variants§
Implementations§
Source§impl ExternType
impl ExternType
Sourcepub fn func(&self) -> Option<&FuncType>
pub fn func(&self) -> Option<&FuncType>
The underlying type if this ExternType is that variant, else None.
Sourcepub fn unwrap_func(&self) -> &FuncType
pub fn unwrap_func(&self) -> &FuncType
The underlying type, panicking if this ExternType is a different variant.
Sourcepub fn global(&self) -> Option<&GlobalType>
pub fn global(&self) -> Option<&GlobalType>
The underlying type if this ExternType is that variant, else None.
Sourcepub fn unwrap_global(&self) -> &GlobalType
pub fn unwrap_global(&self) -> &GlobalType
The underlying type, panicking if this ExternType is a different variant.
Sourcepub fn table(&self) -> Option<&TableType>
pub fn table(&self) -> Option<&TableType>
The underlying type if this ExternType is that variant, else None.
Sourcepub fn unwrap_table(&self) -> &TableType
pub fn unwrap_table(&self) -> &TableType
The underlying type, panicking if this ExternType is a different variant.
Sourcepub fn memory(&self) -> Option<&MemoryType>
pub fn memory(&self) -> Option<&MemoryType>
The underlying type if this ExternType is that variant, else None.
Sourcepub fn unwrap_memory(&self) -> &MemoryType
pub fn unwrap_memory(&self) -> &MemoryType
The underlying type, panicking if this ExternType is a different variant.
Sourcepub fn tag(&self) -> Option<&TagType>
pub fn tag(&self) -> Option<&TagType>
The underlying type if this ExternType is that variant, else None.
Sourcepub fn unwrap_tag(&self) -> &TagType
pub fn unwrap_tag(&self) -> &TagType
The underlying type, panicking if this ExternType is a different variant.
Trait Implementations§
Source§impl Clone for ExternType
impl Clone for ExternType
Auto Trait Implementations§
impl Freeze for ExternType
impl RefUnwindSafe for ExternType
impl Send for ExternType
impl Sync for ExternType
impl Unpin for ExternType
impl UnsafeUnpin for ExternType
impl UnwindSafe for ExternType
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