[−][src]Struct wasmparser::BinaryReader
A binary reader of the WebAssembly structures and types.
Methods
impl<'a> BinaryReader<'a>
[src]
impl<'a> BinaryReader<'a>
pub fn new(data: &[u8]) -> BinaryReader | [src] |
Constructs BinaryReader
type.
Examples
let fn_body = &vec![0x41, 0x00, 0x10, 0x00, 0x0B]; let mut reader = wasmparser::BinaryReader::new(fn_body); while !reader.eof() { let op = reader.read_operator(); println!("{:?}", op) }
pub fn new_with_offset(data: &[u8], original_offset: usize) -> BinaryReader | [src] |
pub fn original_position(&self) -> usize | [src] |
pub fn read_type(&mut self) -> Result<Type> | [src] |
pub fn read_local_count(&mut self) -> Result<usize> | [src] |
Read a count
indicating the number of times to call read_local_decl
.
pub fn read_local_decl( | [src] |
Read a (count, value_type)
declaration of local variables of the same type.
pub fn eof(&self) -> bool | [src] |
pub fn current_position(&self) -> usize | [src] |
pub fn bytes_remaining(&self) -> usize | [src] |
pub fn read_bytes(&mut self, size: usize) -> Result<&'a [u8]> | [src] |
pub fn read_u32(&mut self) -> Result<u32> | [src] |
pub fn read_u64(&mut self) -> Result<u64> | [src] |
pub fn read_u8(&mut self) -> Result<u32> | [src] |
pub fn read_var_u32(&mut self) -> Result<u32> | [src] |
pub fn skip_var_32(&mut self) -> Result<()> | [src] |
pub fn skip_type(&mut self) -> Result<()> | [src] |
pub fn skip_bytes(&mut self, len: usize) -> Result<()> | [src] |
pub fn skip_string(&mut self) -> Result<()> | [src] |
pub fn read_var_i32(&mut self) -> Result<i32> | [src] |
pub fn read_var_i64(&mut self) -> Result<i64> | [src] |
pub fn read_f32(&mut self) -> Result<Ieee32> | [src] |
pub fn read_f64(&mut self) -> Result<Ieee64> | [src] |
pub fn read_string(&mut self) -> Result<&'a str> | [src] |
pub fn read_operator(&mut self) -> Result<Operator<'a>> | [src] |
Trait Implementations
impl<'a> Clone for BinaryReader<'a>
[src]
impl<'a> Clone for BinaryReader<'a>
fn clone(&self) -> BinaryReader<'a> | [src] |
fn clone_from(&mut self, source: &Self) | 1.0.0 [src] |
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl<'a> Send for BinaryReader<'a>
impl<'a> Send for BinaryReader<'a>
impl<'a> Sync for BinaryReader<'a>
impl<'a> Sync for BinaryReader<'a>
Blanket Implementations
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error> | [src] |
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T | [src] |
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error> | [src] |
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId | [src] |