pub enum ExternType {
Func(FuncType),
Table(TableType),
Mem(MemType),
Global(GlobalType),
}Expand description
The type of an ExternVal.
Variants§
Implementations§
Source§impl ExternType
impl ExternType
Sourcepub fn is_func(self) -> bool
pub fn is_func(self) -> bool
Returns true if this ExternType is a FuncType.
Sourcepub fn is_table(self) -> bool
pub fn is_table(self) -> bool
Returns true if this ExternType is a TableType.
Sourcepub fn is_mem(self) -> bool
pub fn is_mem(self) -> bool
Returns true if this ExternType is a MemType.
Sourcepub fn is_global(self) -> bool
pub fn is_global(self) -> bool
Returns true if this ExternType is a GlobalType.
Sourcepub fn to_func(self) -> Option<FuncType>
pub fn to_func(self) -> Option<FuncType>
Returns the underlying FuncType if this ExternType is a FuncType.
Sourcepub fn to_table(self) -> Option<TableType>
pub fn to_table(self) -> Option<TableType>
Converts this ExternType to a TableType, if it is one.
Sourcepub fn to_global(self) -> Option<GlobalType>
pub fn to_global(self) -> Option<GlobalType>
Converts this ExternType to a GlobalType, if it is one.
Trait Implementations§
Source§impl Clone for ExternType
impl Clone for ExternType
Source§fn clone(&self) -> ExternType
fn clone(&self) -> ExternType
Returns a duplicate 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 ExternType
impl Debug for ExternType
Source§impl From<FuncType> for ExternType
impl From<FuncType> for ExternType
Source§impl From<GlobalType> for ExternType
impl From<GlobalType> for ExternType
Source§fn from(type_: GlobalType) -> Self
fn from(type_: GlobalType) -> Self
Converts to this type from the input type.
Source§impl From<MemType> for ExternType
impl From<MemType> for ExternType
Source§impl From<TableType> for ExternType
impl From<TableType> for ExternType
Source§impl Hash for ExternType
impl Hash for ExternType
Source§impl PartialEq for ExternType
impl PartialEq for ExternType
impl Eq for ExternType
impl StructuralPartialEq 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 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