Trait remoteprocess::ProcessMemory
source · pub trait ProcessMemory {
// Required method
fn read(&self, addr: usize, buf: &mut [u8]) -> Result<(), Error>;
// Provided methods
fn copy(&self, addr: usize, length: usize) -> Result<Vec<u8>, Error> { ... }
fn copy_struct<T>(&self, addr: usize) -> Result<T, Error> { ... }
fn copy_pointer<T>(&self, ptr: *const T) -> Result<T, Error> { ... }
fn copy_vec<T>(&self, addr: usize, length: usize) -> Result<Vec<T>, Error> { ... }
}
Required Methods§
Provided Methods§
sourcefn copy(&self, addr: usize, length: usize) -> Result<Vec<u8>, Error>
fn copy(&self, addr: usize, length: usize) -> Result<Vec<u8>, Error>
Copies a series of bytes from another process. Main difference with ‘read’ is that this will allocate memory for you
sourcefn copy_struct<T>(&self, addr: usize) -> Result<T, Error>
fn copy_struct<T>(&self, addr: usize) -> Result<T, Error>
Copies a structure from another process
sourcefn copy_pointer<T>(&self, ptr: *const T) -> Result<T, Error>
fn copy_pointer<T>(&self, ptr: *const T) -> Result<T, Error>
Given a pointer that points to a struct in another process, returns the struct
Object Safety§
This trait is not object safe.