Type Alias cranelift_wasm::wasmparser::ProducersSectionReader

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

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

§Examples

use wasmparser::{ProducersSectionReader, ProducersFieldValue, Result};
let reader = ProducersSectionReader::new(data, 0).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 */ }