Peek at a ROM byte without mutation.
(&self, addr: u64)
| 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 | |
| 47 | impl MemoryAccess for Rom { |
| 48 | fn read_byte(&mut self, addr: u64) -> Result<u8, VmError> { |