[][src]Enum wasmtime::ExternType

pub enum ExternType {
    Func(FuncType),
    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

Func(FuncType)

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<&FuncType>[src]

Attempt to return the underlying type of this external type, returning None if it is a different type.

pub fn unwrap_func(&self) -> &FuncType[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.

Trait Implementations

impl Clone for ExternType[src]

impl Debug for ExternType[src]

impl Eq for ExternType[src]

impl From<FuncType> for ExternType[src]

impl From<GlobalType> for ExternType[src]

impl From<MemoryType> for ExternType[src]

impl From<TableType> for ExternType[src]

impl Hash for ExternType[src]

impl PartialEq<ExternType> 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<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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.