[][src]Trait walrus::CustomSection

pub trait CustomSection: Any + Debug + Send + Sync {
    fn name(&self) -> &str;
fn data(&self) -> Cow<[u8]>; }

A trait for implementing custom sections.

Custom sections are added to a walrus::Module via my_module.custom_sections.add(my_custom_section).

Required methods

fn name(&self) -> &str

Get this custom section's name.

For example ".debug_info" for one of the DWARF custom sections or "name" for the names custom section.

fn data(&self) -> Cow<[u8]>

Get the data payload for this custom section.

This should not include the section header with id=0, the custom section's name, or the count of how many bytes are in the payload. walrus will handle these for you.

Loading content...

Implementors

impl CustomSection for RawCustomSection[src]

Loading content...