pub struct ComponentNameSection { /* private fields */ }
Expand description
Encoding for the component-name
custom section which assigns
human-readable names to items within a component.
Implementations§
Source§impl ComponentNameSection
impl ComponentNameSection
Sourcepub fn new() -> Self
Available on crate feature component-model
only.
pub fn new() -> Self
component-model
only.Creates a new blank name
custom section.
Sourcepub fn component(&mut self, name: &str)
Available on crate feature component-model
only.
pub fn component(&mut self, name: &str)
component-model
only.Appends a component name subsection to this section.
This will indicate that the name of the entire component should be the
name
specified. Note that this should be encoded first before other
subsections.
Sourcepub fn core_funcs(&mut self, names: &NameMap)
Available on crate feature component-model
only.
pub fn core_funcs(&mut self, names: &NameMap)
component-model
only.Appends a decls name subsection to name core functions within the component.
Sourcepub fn core_tables(&mut self, names: &NameMap)
Available on crate feature component-model
only.
pub fn core_tables(&mut self, names: &NameMap)
component-model
only.Appends a decls name subsection to name core tables within the component.
Sourcepub fn core_memories(&mut self, names: &NameMap)
Available on crate feature component-model
only.
pub fn core_memories(&mut self, names: &NameMap)
component-model
only.Appends a decls name subsection to name core memories within the component.
Sourcepub fn core_globals(&mut self, names: &NameMap)
Available on crate feature component-model
only.
pub fn core_globals(&mut self, names: &NameMap)
component-model
only.Appends a decls name subsection to name core globals within the component.
Available on crate feature component-model
only.
component-model
only.Appends a decls name subsection to name core tags within the component.
Sourcepub fn core_types(&mut self, names: &NameMap)
Available on crate feature component-model
only.
pub fn core_types(&mut self, names: &NameMap)
component-model
only.Appends a decls name subsection to name core types within the component.
Sourcepub fn core_modules(&mut self, names: &NameMap)
Available on crate feature component-model
only.
pub fn core_modules(&mut self, names: &NameMap)
component-model
only.Appends a decls name subsection to name core modules within the component.
Sourcepub fn core_instances(&mut self, names: &NameMap)
Available on crate feature component-model
only.
pub fn core_instances(&mut self, names: &NameMap)
component-model
only.Appends a decls name subsection to name core instances within the component.
Sourcepub fn funcs(&mut self, names: &NameMap)
Available on crate feature component-model
only.
pub fn funcs(&mut self, names: &NameMap)
component-model
only.Appends a decls name subsection to name component functions within the component.
Sourcepub fn values(&mut self, names: &NameMap)
Available on crate feature component-model
only.
pub fn values(&mut self, names: &NameMap)
component-model
only.Appends a decls name subsection to name component values within the component.
Sourcepub fn types(&mut self, names: &NameMap)
Available on crate feature component-model
only.
pub fn types(&mut self, names: &NameMap)
component-model
only.Appends a decls name subsection to name component type within the component.
Sourcepub fn components(&mut self, names: &NameMap)
Available on crate feature component-model
only.
pub fn components(&mut self, names: &NameMap)
component-model
only.Appends a decls name subsection to name components within the component.
Sourcepub fn instances(&mut self, names: &NameMap)
Available on crate feature component-model
only.
pub fn instances(&mut self, names: &NameMap)
component-model
only.Appends a decls name subsection to name component instances within the component.
Sourcepub fn raw(&mut self, id: u8, data: &[u8])
Available on crate feature component-model
only.
pub fn raw(&mut self, id: u8, data: &[u8])
component-model
only.Appends a raw subsection with the given id and data.
Sourcepub fn is_empty(&self) -> bool
Available on crate feature component-model
only.
pub fn is_empty(&self) -> bool
component-model
only.Returns whether this section is empty, or nothing has been encoded.
Sourcepub fn as_custom<'a>(&'a self) -> CustomSection<'a>
Available on crate feature component-model
only.
pub fn as_custom<'a>(&'a self) -> CustomSection<'a>
component-model
only.View the encoded section as a CustomSection.
Trait Implementations§
Source§impl Clone for ComponentNameSection
Available on crate feature component-model
only.
impl Clone for ComponentNameSection
component-model
only.Source§fn clone(&self) -> ComponentNameSection
fn clone(&self) -> ComponentNameSection
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl ComponentSection for ComponentNameSection
Available on crate feature component-model
only.
impl ComponentSection for ComponentNameSection
component-model
only.Source§impl Debug for ComponentNameSection
Available on crate feature component-model
only.
impl Debug for ComponentNameSection
component-model
only.Source§impl Default for ComponentNameSection
Available on crate feature component-model
only.
impl Default for ComponentNameSection
component-model
only.