pub struct ComponentNameSection { /* private fields */ }
component-model
only.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 component(&mut self, name: &str)
pub fn component(&mut self, name: &str)
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)
pub fn core_funcs(&mut self, names: &NameMap)
Appends a decls name subsection to name core functions within the component.
Sourcepub fn core_tables(&mut self, names: &NameMap)
pub fn core_tables(&mut self, names: &NameMap)
Appends a decls name subsection to name core tables within the component.
Sourcepub fn core_memories(&mut self, names: &NameMap)
pub fn core_memories(&mut self, names: &NameMap)
Appends a decls name subsection to name core memories within the component.
Sourcepub fn core_globals(&mut self, names: &NameMap)
pub fn core_globals(&mut self, names: &NameMap)
Appends a decls name subsection to name core globals within the component.
Sourcepub fn core_types(&mut self, names: &NameMap)
pub fn core_types(&mut self, names: &NameMap)
Appends a decls name subsection to name core types within the component.
Sourcepub fn core_modules(&mut self, names: &NameMap)
pub fn core_modules(&mut self, names: &NameMap)
Appends a decls name subsection to name core modules within the component.
Sourcepub fn core_instances(&mut self, names: &NameMap)
pub fn core_instances(&mut self, names: &NameMap)
Appends a decls name subsection to name core instances within the component.
Sourcepub fn funcs(&mut self, names: &NameMap)
pub fn funcs(&mut self, names: &NameMap)
Appends a decls name subsection to name component functions within the component.
Sourcepub fn values(&mut self, names: &NameMap)
pub fn values(&mut self, names: &NameMap)
Appends a decls name subsection to name component values within the component.
Sourcepub fn types(&mut self, names: &NameMap)
pub fn types(&mut self, names: &NameMap)
Appends a decls name subsection to name component type within the component.
Sourcepub fn components(&mut self, names: &NameMap)
pub fn components(&mut self, names: &NameMap)
Appends a decls name subsection to name components within the component.
Sourcepub fn instances(&mut self, names: &NameMap)
pub fn instances(&mut self, names: &NameMap)
Appends a decls name subsection to name component instances within the component.
Sourcepub fn raw(&mut self, id: u8, data: &[u8])
pub fn raw(&mut self, id: u8, data: &[u8])
Appends a raw subsection with the given id and data.
Sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Returns whether this section is empty, or nothing has been encoded.
Sourcepub fn as_custom<'a>(&'a self) -> CustomSection<'a>
pub fn as_custom<'a>(&'a self) -> CustomSection<'a>
View the encoded section as a CustomSection.
Trait Implementations§
Source§impl Clone for ComponentNameSection
impl Clone for ComponentNameSection
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 more