Struct wasmtime_environ::wasm::wasmparser::MemorySectionReader   [−][src]
pub struct MemorySectionReader<'a> { /* fields omitted */ }Implementations
impl<'a> MemorySectionReader<'a>[src]
impl<'a> MemorySectionReader<'a>[src]pub fn new(
    data: &'a [u8], 
    offset: usize
) -> Result<MemorySectionReader<'a>, BinaryReaderError>[src]
data: &'a [u8],
offset: usize
) -> Result<MemorySectionReader<'a>, BinaryReaderError>
pub fn original_position(&self) -> usize[src]
pub fn get_count(&self) -> u32[src]
pub fn read(&mut self) -> Result<MemoryType, BinaryReaderError>[src]
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
impl<'a> Clone for MemorySectionReader<'a>[src]
impl<'a> Clone for MemorySectionReader<'a>[src]pub fn clone(&self) -> MemorySectionReader<'a>[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
impl<'a> IntoIterator for MemorySectionReader<'a>[src]
impl<'a> IntoIterator for MemorySectionReader<'a>[src]type Item = Result<MemoryType, BinaryReaderError>
The type of the elements being iterated over.
type IntoIter = SectionIteratorLimited<MemorySectionReader<'a>>
Which kind of iterator are we turning this into?
pub fn into_iter(self) -> <MemorySectionReader<'a> as IntoIterator>::IntoIter[src]
impl<'a> SectionReader for MemorySectionReader<'a>[src]
impl<'a> SectionReader for MemorySectionReader<'a>[src]type Item = MemoryType
pub fn read(
    &mut self
) -> Result<<MemorySectionReader<'a> as SectionReader>::Item, BinaryReaderError>[src]
&mut self
) -> Result<<MemorySectionReader<'a> as SectionReader>::Item, BinaryReaderError>
pub fn eof(&self) -> bool[src]
pub fn original_position(&self) -> usize[src]
pub fn range(&self) -> Range[src]
pub fn ensure_end(&self) -> Result<(), BinaryReaderError>[src]
impl<'a> SectionWithLimitedItems for MemorySectionReader<'a>[src]
impl<'a> SectionWithLimitedItems for MemorySectionReader<'a>[src]