pub struct ProducersSectionReader<'a> { /* private fields */ }
Expand description

A reader for the producers custom section of a WebAssembly module.

Implementations

Creates reader for the producers section.

Examples
use wasmparser_nostd::{ProducersSectionReader, ProducersFieldValue, Result};
let mut reader = ProducersSectionReader::new(data, 0).expect("producers reader");
let field = reader.read().expect("producers field");
assert!(field.name == "language");
let mut values_reader = field.get_producer_field_values_reader().expect("values reader");
let value = values_reader.into_iter().collect::<Result<Vec<ProducersFieldValue>>>().expect("values");
assert!(value.len() == 2);
assert!(value[0].name == "wat" && value[0].version == "1");
assert!(value[1].name == "C" && value[1].version == "9.0");

Gets the original position of the reader.

Gets the count of items in the reader.

Reads an item from the reader.

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
The item returned by the reader.
Reads an item from the section.
Determines if the reader is at end-of-section.
Gets the original position of the reader.
Gets the range of the reader.
Ensures the reader is at the end of the section. Read more
Gets the count of the items in the section.
Returns an iterator over the items within this section where the offset in the original section is provided with the item. 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.