Enum wasmi::ExternVal[][src]

pub enum ExternVal {
    Func(FuncRef),
    Table(TableRef),
    Memory(MemoryRef),
    Global(GlobalRef),
}

An external value is the runtime representation of an entity that can be imported or exported.

Variants

Func(FuncRef)

Function.

Table(TableRef)

Table.

Memory(MemoryRef)

Memory.

Global(GlobalRef)

Global.

Should be immutable.

Implementations

impl ExternVal[src]

pub fn as_func(&self) -> Option<&FuncRef>[src]

Get underlying function reference if this ExternVal contains a function, or None if it is some other kind.

pub fn as_table(&self) -> Option<&TableRef>[src]

Get underlying table reference if this ExternVal contains a table, or None if it is some other kind.

pub fn as_memory(&self) -> Option<&MemoryRef>[src]

Get underlying memory reference if this ExternVal contains a memory, or None if it is some other kind.

pub fn as_global(&self) -> Option<&GlobalRef>[src]

Get underlying global variable reference if this ExternVal contains a global, or None if it is some other kind.

Trait Implementations

impl Clone for ExternVal[src]

impl Debug for ExternVal[src]

Auto Trait Implementations

impl !RefUnwindSafe for ExternVal

impl !Send for ExternVal

impl !Sync for ExternVal

impl Unpin for ExternVal

impl !UnwindSafe for ExternVal

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> 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.