Enum wasmer_types::ExternType[][src]

pub enum ExternType {
    Function(FunctionType),
    Global(GlobalType),
    Table(TableType),
    Memory(MemoryType),
}

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]

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]

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]

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]

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]

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]

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]

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]

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]

Check if two externs are compatible

Trait Implementations

impl Clone for ExternType[src]

impl Debug for ExternType[src]

impl<'de> Deserialize<'de> for ExternType[src]

impl Eq for ExternType[src]

impl Hash for ExternType[src]

impl PartialEq<ExternType> for ExternType[src]

impl Serialize for ExternType[src]

impl StructuralEq for ExternType[src]

impl StructuralPartialEq for ExternType[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.