MCPcopy Create free account
hub / github.com/LPC4/Full-Stack / peek_byte

Method peek_byte

crates/virtual-machine/src/memory/rom.rs:43–45  ·  view source on GitHub ↗

Peek at a ROM byte without mutation.

(&self, addr: u64)

Source from the content-addressed store, hash-verified

41 /// Peek at a ROM byte without mutation.
42 pub fn peek_byte(&self, addr: u64) -> Option<u8> {
43 self.index(addr).map(|idx| self.data[idx])
44 }
45}
46
47impl MemoryAccess for Rom {
48 fn read_byte(&mut self, addr: u64) -> Result<u8, VmError> {

Callers

nothing calls this directly

Calls 1

indexMethod · 0.45

Tested by

no test coverage detected