Struct wasm_encoder::ComponentNameSection
source · 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 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 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 moresource§impl Debug for ComponentNameSection
impl Debug for ComponentNameSection
source§impl Default for ComponentNameSection
impl Default for ComponentNameSection
source§fn default() -> ComponentNameSection
fn default() -> ComponentNameSection
Auto Trait Implementations§
impl Freeze for ComponentNameSection
impl RefUnwindSafe for ComponentNameSection
impl Send for ComponentNameSection
impl Sync for ComponentNameSection
impl Unpin for ComponentNameSection
impl UnwindSafe for ComponentNameSection
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)