Skip to main content

MemoryReader

Trait MemoryReader 

Source
pub trait MemoryReader {
    // Required method
    fn read_bytes(&self, addr: usize, buf: &mut [u8]) -> Option<()>;
}
Expand description

Abstract byte reader for address spaces that cannot be dereferenced directly from the current process.

This is the intended integration point for out-of-process backends such as ReadProcessMemory, kernel drivers, DMA, and VM introspection.

Required Methods§

Source

fn read_bytes(&self, addr: usize, buf: &mut [u8]) -> Option<()>

Fill buf with bytes starting at addr.

Returns None when the read fails or the range is not available.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§