pub struct ElementSectionReader<'a> { /* private fields */ }

Implementations

Reads content of the element section.

Examples
use wasmparser::ModuleReader;
let mut reader = ModuleReader::new(data).expect("module reader");
let section = reader.read().expect("type section");
let section = reader.read().expect("function section");
let section = reader.read().expect("table section");
let section = reader.read().expect("element section");
let mut element_reader = section.get_element_section_reader().expect("element section reader");
for _ in 0..element_reader.get_count() {
    let element = element_reader.read().expect("element");
    println!("Element: {:?}", element);
    let mut init_expr_reader = element.init_expr.get_binary_reader();
    let op = init_expr_reader.read_operator().expect("op");
    println!("Init const: {:?}", op);
    let mut items_reader = element.items.get_items_reader().expect("items reader");
    for _ in 0..items_reader.get_count() {
        let item = items_reader.read().expect("item");
        println!("  Item: {}", item);
    }
}

Trait Implementations

The type of the elements being iterated over.
Which kind of iterator are we turning this into?
Creates an iterator from a value. 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 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.