pub trait CopyAddress {
    fn copy_address(&self, addr: usize, buf: &mut [u8]) -> Result<()>;
    fn get_pointer_width(&self) -> Architecture;

    fn get_offset(&self, offsets: &[usize]) -> Result<usize> { ... }
}
Expand description

A trait that defines that it is possible to copy some memory from something represented by a type into a buffer.

Required Methods

Copy an address into user-defined buffer.

Errors

std::io::Error if an error occurs copying the address.

Get the the pointer width of the underlying process. This is required for get_offset to work.

Performance

Any implementation of this function should be marked with #[inline(always)] as this function is very commonly called and should be inlined.

Provided Methods

Get the actual memory location from a set of offsets.

If copy_address and get_pointer_width are already defined, then we can provide a standard implementation that will work across all operating systems.

Errors

std::io::Error if an error occurs copying the address.

Implementors

Use ReadProcessMemory to read memory from another process on Windows.