Struct wasmtime_environ::wasmparser::FunctionSectionReader [−][src]
pub struct FunctionSectionReader<'a> { /* fields omitted */ }
Implementations
pub fn new(
data: &'a [u8],
offset: usize
) -> Result<FunctionSectionReader<'a>, BinaryReaderError>
Reads function type index from the function section.
Examples
use wasmparser::FunctionSectionReader;
let mut function_reader = FunctionSectionReader::new(data, 0).unwrap();
for _ in 0..function_reader.get_count() {
let ty = function_reader.read().expect("function type index");
println!("Function type index: {}", ty);
}
Trait Implementations
type Item = Result<u32, BinaryReaderError>
type Item = Result<u32, BinaryReaderError>
The type of the elements being iterated over.
type IntoIter = SectionIteratorLimited<FunctionSectionReader<'a>>
type IntoIter = SectionIteratorLimited<FunctionSectionReader<'a>>
Which kind of iterator are we turning this into?
Creates an iterator from a value. Read more
pub fn read(
&mut self
) -> Result<<FunctionSectionReader<'a> as SectionReader>::Item, BinaryReaderError>
Auto Trait Implementations
impl<'a> RefUnwindSafe for FunctionSectionReader<'a>
impl<'a> Send for FunctionSectionReader<'a>
impl<'a> Sync for FunctionSectionReader<'a>
impl<'a> Unpin for FunctionSectionReader<'a>
impl<'a> UnwindSafe for FunctionSectionReader<'a>
Blanket Implementations
Mutably borrows from an owned value. Read more