pub struct LinearMemory<'a> { /* private fields */ }Expand description
A flat byte buffer addressed by offset: the transport for Wasm linear memory, and for any caller whose pointers are offsets into one buffer. Offset 0 is null.
Implementations§
Trait Implementations§
Source§impl Transport for LinearMemory<'_>
impl Transport for LinearMemory<'_>
Source§fn word_bits(&self) -> u32
fn word_bits(&self) -> u32
Width in bits of the caller’s pointer-sized word, 32 or 64, never wider
than the host’s
usize. It tells a zero-extended 32-bit word from a
sign-extended 64-bit one.Source§fn bytes(&self, address: Word, length: usize) -> Result<&[u8]>
fn bytes(&self, address: Word, length: usize) -> Result<&[u8]>
Borrow
length bytes at address. A null address is valid only for an
empty range.Auto Trait Implementations§
impl<'a> Freeze for LinearMemory<'a>
impl<'a> RefUnwindSafe for LinearMemory<'a>
impl<'a> Send for LinearMemory<'a>
impl<'a> Sync for LinearMemory<'a>
impl<'a> Unpin for LinearMemory<'a>
impl<'a> UnsafeUnpin for LinearMemory<'a>
impl<'a> !UnwindSafe for LinearMemory<'a>
Blanket Implementations§
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