[−][src]Struct wit_parser::Parser
Top-level parser for the WebAssembly Interface Types binary section.
This Parser
is used to iterate over Section
instances to learn about
each section in the binary format.
Methods
impl<'a> Parser<'a>
[src]
pub fn new(offset: usize, bytes: &'a [u8]) -> Result<Parser<'a>>
[src]
Creates a new Parser
from the given binary blob.
Currently the binary blob is expected to be the payload of a custom
section called wasm-interface-types
. This will almost surely change in
the future.
The offset
argument is the offset in which bytes
was found in the
original binary file, used to generate error messages.
pub fn is_empty(&self) -> bool
[src]
Returns if there are no more bytes to parse in this Parser
, and all
sections have been read.
pub fn section(&mut self) -> Result<Section<'a>>
[src]
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for Parser<'a>
impl<'a> Send for Parser<'a>
impl<'a> Sync for Parser<'a>
impl<'a> Unpin for Parser<'a>
impl<'a> UnwindSafe for Parser<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
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, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,