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