Enum wasmer_types::ExternType [−][src]
pub enum ExternType { Function(FunctionType), Global(GlobalType), Table(TableType), Memory(MemoryType), }
Expand description
A list of all possible types which can be externally referenced from a WebAssembly module.
This list can be found in ImportType
or ExportType
, so these types
can either be imported or exported.
Variants
Function(FunctionType)
This external type is the type of a WebAssembly function.
Global(GlobalType)
This external type is the type of a WebAssembly global.
Table(TableType)
This external type is the type of a WebAssembly table.
Memory(MemoryType)
This external type is the type of a WebAssembly memory.
Implementations
impl ExternType
[src]
impl ExternType
[src]pub fn func(&self) -> Option<&FunctionType>
[src]
pub fn func(&self) -> Option<&FunctionType>
[src]Attempt to return the underlying type of this external type,
returning None
if it is a different type.
pub fn unwrap_func(&self) -> &FunctionType
[src]
pub fn unwrap_func(&self) -> &FunctionType
[src]Returns the underlying descriptor of this ExternType
, panicking
if it is a different type.
Panics
Panics if self
is not of the right type.
pub fn global(&self) -> Option<&GlobalType>
[src]
pub fn global(&self) -> Option<&GlobalType>
[src]Attempt to return the underlying type of this external type,
returning None
if it is a different type.
pub fn unwrap_global(&self) -> &GlobalType
[src]
pub fn unwrap_global(&self) -> &GlobalType
[src]Returns the underlying descriptor of this ExternType
, panicking
if it is a different type.
Panics
Panics if self
is not of the right type.
pub fn table(&self) -> Option<&TableType>
[src]
pub fn table(&self) -> Option<&TableType>
[src]Attempt to return the underlying type of this external type,
returning None
if it is a different type.
pub fn unwrap_table(&self) -> &TableType
[src]
pub fn unwrap_table(&self) -> &TableType
[src]Returns the underlying descriptor of this ExternType
, panicking
if it is a different type.
Panics
Panics if self
is not of the right type.
pub fn memory(&self) -> Option<&MemoryType>
[src]
pub fn memory(&self) -> Option<&MemoryType>
[src]Attempt to return the underlying type of this external type,
returning None
if it is a different type.
pub fn unwrap_memory(&self) -> &MemoryType
[src]
pub fn unwrap_memory(&self) -> &MemoryType
[src]Returns the underlying descriptor of this ExternType
, panicking
if it is a different type.
Panics
Panics if self
is not of the right type.
pub fn is_compatible_with(&self, other: &Self) -> bool
[src]
pub fn is_compatible_with(&self, other: &Self) -> bool
[src]Check if two externs are compatible
Trait Implementations
impl Clone for ExternType
[src]
impl Clone for ExternType
[src]fn clone(&self) -> ExternType
[src]
fn clone(&self) -> ExternType
[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]Performs copy-assignment from source
. Read more
impl Debug for ExternType
[src]
impl Debug for ExternType
[src]impl<'de> Deserialize<'de> for ExternType
[src]
impl<'de> Deserialize<'de> for ExternType
[src]fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]Deserialize this value from the given Serde deserializer. Read more
impl Hash for ExternType
[src]
impl Hash for ExternType
[src]impl PartialEq<ExternType> for ExternType
[src]
impl PartialEq<ExternType> for ExternType
[src]fn eq(&self, other: &ExternType) -> bool
[src]
fn eq(&self, other: &ExternType) -> bool
[src]This method tests for self
and other
values to be equal, and is used
by ==
. Read more
fn ne(&self, other: &ExternType) -> bool
[src]
fn ne(&self, other: &ExternType) -> bool
[src]This method tests for !=
.
impl Serialize for ExternType
[src]
impl Serialize for ExternType
[src]impl Eq for ExternType
[src]
impl StructuralEq for ExternType
[src]
impl StructuralPartialEq for ExternType
[src]
Auto Trait Implementations
impl RefUnwindSafe for ExternType
impl Send for ExternType
impl Sync for ExternType
impl Unpin for ExternType
impl UnwindSafe for ExternType
Blanket Implementations
impl<T> ArchivePointee for T
[src]
impl<T> ArchivePointee for T
[src]type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
pub fn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
[src]
pub fn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
[src]Converts some archived metadata to the pointer metadata for itself.
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]pub fn equivalent(&self, key: &K) -> bool
[src]
pub fn equivalent(&self, key: &K) -> bool
[src]Compare self to key
and return true
if they are equal.
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,