Enum wast::ItemRef[][src]

pub enum ItemRef<'a, K> {
    Outer {
        kind: K,
        module: Index<'a>,
        idx: Index<'a>,
    },
    Item {
        kind: K,
        idx: Index<'a>,
        exports: Vec<&'a str>,
    },
}

Parses (func $foo)

Optionally includes export strings for module-linking sugar syntax for alias injection.

Variants

Outer

Fields of Outer

kind: Kmodule: Index<'a>idx: Index<'a>
Item

Fields of Item

kind: Kidx: Index<'a>exports: Vec<&'a str>

Implementations

impl<'a, K> ItemRef<'a, K>[src]

pub fn unwrap_index(&self) -> &Index<'a>[src]

Unwraps the underlying Index for ItemRef::Item.

Panics if this is ItemRef::Outer or if exports haven’t been expanded yet.

Trait Implementations

impl<'a, K: Clone> Clone for ItemRef<'a, K>[src]

impl<'a, K: Debug> Debug for ItemRef<'a, K>[src]

impl<'a, K: Parse<'a>> Parse<'a> for ItemRef<'a, K>[src]

impl<'a, K: Peek> Peek for ItemRef<'a, K>[src]

Auto Trait Implementations

impl<'a, K> RefUnwindSafe for ItemRef<'a, K> where
    K: RefUnwindSafe

impl<'a, K> Send for ItemRef<'a, K> where
    K: Send

impl<'a, K> Sync for ItemRef<'a, K> where
    K: Sync

impl<'a, K> Unpin for ItemRef<'a, K> where
    K: Unpin

impl<'a, K> UnwindSafe for ItemRef<'a, K> where
    K: UnwindSafe

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.