pub struct MiddlewareBinaryReader<'a> { /* private fields */ }
Expand description
A Middleware binary reader of the WebAssembly structures and types.
Implementations§
Source§impl<'a> MiddlewareBinaryReader<'a>
impl<'a> MiddlewareBinaryReader<'a>
Sourcepub fn new_with_offset(data: &'a [u8], original_offset: usize) -> Self
pub fn new_with_offset(data: &'a [u8], original_offset: usize) -> Self
Constructs a MiddlewareBinaryReader
with an explicit starting offset.
Sourcepub fn set_middleware_chain(&mut self, stages: Vec<Box<dyn FunctionMiddleware>>)
pub fn set_middleware_chain(&mut self, stages: Vec<Box<dyn FunctionMiddleware>>)
Replaces the middleware chain with a new one.
Trait Implementations§
Source§impl<'a> Debug for MiddlewareBinaryReader<'a>
impl<'a> Debug for MiddlewareBinaryReader<'a>
Source§impl<'a> FunctionBinaryReader<'a> for MiddlewareBinaryReader<'a>
impl<'a> FunctionBinaryReader<'a> for MiddlewareBinaryReader<'a>
Source§fn read_local_count(&mut self) -> WasmResult<u32>
fn read_local_count(&mut self) -> WasmResult<u32>
Read a
count
indicating the number of times to call read_local_decl
.Source§fn read_local_decl(&mut self) -> WasmResult<(u32, ValType)>
fn read_local_decl(&mut self) -> WasmResult<(u32, ValType)>
Read a
(count, value_type)
declaration of local variables of the same type.Source§fn read_operator(&mut self) -> WasmResult<Operator<'a>>
fn read_operator(&mut self) -> WasmResult<Operator<'a>>
Reads the next available
Operator
.Source§fn current_position(&self) -> usize
fn current_position(&self) -> usize
Returns the current position.
Source§fn original_position(&self) -> usize
fn original_position(&self) -> usize
Returns the original position (with the offset)
Source§fn bytes_remaining(&self) -> usize
fn bytes_remaining(&self) -> usize
Returns the number of bytes remaining.
Auto Trait Implementations§
impl<'a> Freeze for MiddlewareBinaryReader<'a>
impl<'a> !RefUnwindSafe for MiddlewareBinaryReader<'a>
impl<'a> !Send for MiddlewareBinaryReader<'a>
impl<'a> !Sync for MiddlewareBinaryReader<'a>
impl<'a> Unpin for MiddlewareBinaryReader<'a>
impl<'a> !UnwindSafe for MiddlewareBinaryReader<'a>
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.