wasmparser

Type Alias ProducersSectionReader

Source
pub type ProducersSectionReader<'a> = SectionLimited<'a, ProducersField<'a>>;
Expand description

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

§Examples

let reader = BinaryReader::new(data, 0);
let reader = ProducersSectionReader::new(reader).expect("producers reader");
let field = reader.into_iter().next().unwrap().expect("producers field");
assert!(field.name == "language");
let value = field.values.into_iter().collect::<Result<Vec<_>>>().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");

Aliased Type§

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