pub struct Process { /* private fields */ }Expand description
A handle to an external process for memory operations.
Implementations§
Source§impl Process
impl Process
Sourcepub unsafe fn read<T>(&self, address: usize) -> Result<T, Error>where
T: Copy,
pub unsafe fn read<T>(&self, address: usize) -> Result<T, Error>where
T: Copy,
Read a typed value from the target process at the given address.
§Safety
T must be valid for any bit pattern. Primitive numeric types (u8, i32,
f32, [u8; N], etc.) are safe. Types with validity invariants (bool,
char, enums, references) will cause undefined behavior if the remote
memory contains an invalid representation.
Sourcepub fn write<T>(&self, address: usize, value: &T) -> Result<(), Error>where
T: Copy,
pub fn write<T>(&self, address: usize, value: &T) -> Result<(), Error>where
T: Copy,
Write a typed value to the target process at the given address.
Sourcepub fn read_bytes(&self, address: usize, len: usize) -> Result<Vec<u8>, Error>
pub fn read_bytes(&self, address: usize, len: usize) -> Result<Vec<u8>, Error>
Read raw bytes from the target process.
Sourcepub fn write_bytes(&self, address: usize, bytes: &[u8]) -> Result<(), Error>
pub fn write_bytes(&self, address: usize, bytes: &[u8]) -> Result<(), Error>
Write raw bytes to the target process.
Auto Trait Implementations§
impl Freeze for Process
impl RefUnwindSafe for Process
impl Send for Process
impl Sync for Process
impl Unpin for Process
impl UnsafeUnpin for Process
impl UnwindSafe for Process
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more