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

Method index

crates/virtual-machine/src/memory/ram.rs:27–33  ·  view source on GitHub ↗
(&self, addr: u64)

Source from the content-addressed store, hash-verified

25 }
26
27 fn index(&self, addr: u64) -> Option<usize> {
28 if self.contains(addr) {
29 Some((addr - self.base) as usize)
30 } else {
31 None
32 }
33 }
34
35 /// Return the size of RAM in bytes.
36 pub fn size(&self) -> u64 {

Callers 3

peek_byteMethod · 0.45
read_byteMethod · 0.45
write_byteMethod · 0.45

Calls 1

containsMethod · 0.45

Tested by

no test coverage detected