pub enum Name<'a> {
    Module(SingleName<'a>),
    Function(NameMap<'a>),
    Local(IndirectNameMap<'a>),
    Label(IndirectNameMap<'a>),
    Type(NameMap<'a>),
    Table(NameMap<'a>),
    Memory(NameMap<'a>),
    Global(NameMap<'a>),
    Element(NameMap<'a>),
    Data(NameMap<'a>),
    Unknown {
        ty: u8,
        data: &'a [u8],
        range: Range<usize>,
    },
}
Expand description

Represents a name read from the names custom section.

Variants

Module(SingleName<'a>)

The name is for the module.

Function(NameMap<'a>)

The name is for the functions.

Local(IndirectNameMap<'a>)

The name is for the function locals.

Label(IndirectNameMap<'a>)

The name is for the function labels.

Type(NameMap<'a>)

The name is for the types.

Table(NameMap<'a>)

The name is for the tables.

Memory(NameMap<'a>)

The name is for the memories.

Global(NameMap<'a>)

The name is for the globals.

Element(NameMap<'a>)

The name is for the element segments.

Data(NameMap<'a>)

The name is for the data segments.

Unknown

Fields

ty: u8

The identifier for this subsection.

data: &'a [u8]

The contents of this subsection.

range: Range<usize>

The range of bytes, relative to the start of the original data stream, that the contents of this subsection reside in.

An unknown name subsection.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.