[][src]Enum wasmbin::sections::Section

#[repr(u8)]pub enum Section {
    Custom(Blob<Custom>),
    Type(Blob<Type>),
    Import(Blob<Import>),
    Function(Blob<Function>),
    Table(Blob<Table>),
    Memory(Blob<Memory>),
    Global(Blob<Global>),
    Export(Blob<Export>),
    Start(Blob<Start>),
    Element(Blob<Element>),
    Code(Blob<Code>),
    Data(Blob<Data>),
}

Variants

Custom(Blob<Custom>)
Type(Blob<Type>)
Import(Blob<Import>)
Function(Blob<Function>)
Table(Blob<Table>)
Memory(Blob<Memory>)
Global(Blob<Global>)
Export(Blob<Export>)
Start(Blob<Start>)
Element(Blob<Element>)
Code(Blob<Code>)
Data(Blob<Data>)

Implementations

impl Section[src]

pub fn kind(&self) -> Kind[src]

pub fn try_as<T: Payload>(&self) -> Option<&Blob<T>>[src]

pub fn try_as_mut<T: Payload>(&mut self) -> Option<&mut Blob<T>>[src]

Trait Implementations

impl Arbitrary for Section[src]

impl Clone for Section[src]

impl Debug for Section[src]

impl Decode for Section[src]

impl DecodeWithDiscriminant for Section[src]

type Discriminant = u8

impl Encode for Section[src]

impl Eq for Section[src]

impl From<Blob<CustomSection>> for Section[src]

impl From<Blob<FuncId>> for Section[src]

impl From<Blob<Vec<Blob<FuncBody>>>> for Section[src]

impl From<Blob<Vec<Data>>> for Section[src]

impl From<Blob<Vec<Element>>> for Section[src]

impl From<Blob<Vec<Export>>> for Section[src]

impl From<Blob<Vec<FuncType>>> for Section[src]

impl From<Blob<Vec<Global>>> for Section[src]

impl From<Blob<Vec<Import>>> for Section[src]

impl From<Blob<Vec<MemType>>> for Section[src]

impl From<Blob<Vec<TableType>>> for Section[src]

impl From<Blob<Vec<TypeId>>> for Section[src]

impl From<CustomSection> for Section[src]

impl From<FuncId> for Section[src]

impl From<Vec<Blob<FuncBody>>> for Section[src]

impl From<Vec<Data>> for Section[src]

impl From<Vec<Element>> for Section[src]

impl From<Vec<Export>> for Section[src]

impl From<Vec<FuncType>> for Section[src]

impl From<Vec<Global>> for Section[src]

impl From<Vec<Import>> for Section[src]

impl From<Vec<MemType>> for Section[src]

impl From<Vec<TableType>> for Section[src]

impl From<Vec<TypeId>> for Section[src]

impl Hash for Section[src]

impl PartialEq<Section> for Section[src]

impl StructuralEq for Section[src]

impl StructuralPartialEq for Section[src]

impl Visit for Section where
    Self: 'static, 
[src]

Auto Trait Implementations

impl RefUnwindSafe for Section

impl Send for Section

impl Sync for Section

impl Unpin for Section

impl UnwindSafe for Section

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.