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

Implementations

Creates reader for the producers section.

Examples
use wasmparser::{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");

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

Performs the conversion.

Performs the conversion.

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.