Struct wasmer_compiler::MiddlewareBinaryReader
source · [−]pub struct MiddlewareBinaryReader<'a> { /* private fields */ }
Expand description
A Middleware binary reader of the WebAssembly structures and types.
Implementations
sourceimpl<'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
sourceimpl<'a> Debug for MiddlewareBinaryReader<'a>
impl<'a> Debug for MiddlewareBinaryReader<'a>
sourceimpl<'a> FunctionBinaryReader<'a> for MiddlewareBinaryReader<'a>
impl<'a> FunctionBinaryReader<'a> for MiddlewareBinaryReader<'a>
sourcefn 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
.
sourcefn read_local_decl(&mut self) -> WasmResult<(u32, Type)>
fn read_local_decl(&mut self) -> WasmResult<(u32, Type)>
Read a (count, value_type)
declaration of local variables of the same type.
sourcefn read_operator(&mut self) -> WasmResult<Operator<'a>>
fn read_operator(&mut self) -> WasmResult<Operator<'a>>
Reads the next available Operator
.
sourcefn current_position(&self) -> usize
fn current_position(&self) -> usize
Returns the current position.
sourcefn original_position(&self) -> usize
fn original_position(&self) -> usize
Returns the original position (with the offset)
sourcefn bytes_remaining(&self) -> usize
fn bytes_remaining(&self) -> usize
Returns the number of bytes remaining.
Auto Trait Implementations
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
sourceimpl<T> ArchivePointee for T
impl<T> ArchivePointee for T
type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
sourcepub fn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
pub fn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more