MCPcopy Create free account
hub / github.com/explodingcamera/tinywasm / write_8

Method write_8

crates/tinywasm/src/store/memory/mod.rs:215–219  ·  view source on GitHub ↗

Writes exactly 1 byte at the effective address `base + offset`.

(&mut self, base: u64, offset: u64, byte: u8)

Source from the content-addressed store, hash-verified

213
214 /// Writes exactly 1 byte at the effective address `base + offset`.
215 fn write_8(&mut self, base: u64, offset: u64, byte: u8) -> core::result::Result<(), crate::Trap> {
216 let addr = checked_effective_addr::<1>(self.len(), base, offset)?;
217 self.write(addr, &[byte]);
218 Ok(())
219 }
220
221 /// Writes exactly 2 bytes at the effective address `base + offset`.
222 fn write_16(&mut self, base: u64, offset: u64, bytes: [u8; 2]) -> core::result::Result<(), crate::Trap> {

Callers

nothing calls this directly

Implementers 3

vec.rscrates/tinywasm/src/store/memory/vec.r
paged.rscrates/tinywasm/src/store/memory/paged
lazy.rscrates/tinywasm/src/store/memory/lazy.

Calls 2

lenMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected