[][src]Trait process_memory::CopyAddress

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> { ... } }

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

Required methods

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

Copy an address into user-defined buffer.

Errors

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

fn get_pointer_width(&self) -> Architecture

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.

Loading content...

Provided methods

fn get_offset(&self, offsets: &[usize]) -> Result<usize>

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.

Loading content...

Implementors

impl CopyAddress for ProcessHandle[src]

Loading content...