pub struct Pointer {
pub debug: bool,
/* private fields */
}
Expand description
Represents a pointer path that is dynamically resolved each read/write operation. This ensures that the pointer is always valid. Race conditions can occur and the pointer could encounter a null pointer along the path. Should always be constructed via the Process struct.
§Example
use mem_rs::prelude::*;
let mut process = Process::new("name_of_process.exe");
process.refresh()?;
let pointer = process.create_pointer(0x1234, vec![0]);
let data = pointer.read_u8_rel(Some(0x1234));
Fields§
§debug: bool
Set this to true to print each memory address while resolving the pointer path.
Implementations§
Trait Implementations§
Source§impl BaseReadWrite for Pointer
impl BaseReadWrite for Pointer
Source§fn read_memory_rel(&self, offset: Option<usize>, buffer: &mut [u8]) -> bool
fn read_memory_rel(&self, offset: Option<usize>, buffer: &mut [u8]) -> bool
Read memory relative to the object’s location in memory. Supports an optional offset. Read more
Source§fn write_memory_rel(&self, offset: Option<usize>, buffer: &[u8]) -> bool
fn write_memory_rel(&self, offset: Option<usize>, buffer: &[u8]) -> bool
Write memory relative to the object’s location in memory. Supports an optional offset. Read more
Source§fn read_memory_abs(&self, address: usize, buffer: &mut [u8]) -> bool
fn read_memory_abs(&self, address: usize, buffer: &mut [u8]) -> bool
Read memory from an absolute address Read more
Source§fn write_memory_abs(&self, address: usize, buffer: &[u8]) -> bool
fn write_memory_abs(&self, address: usize, buffer: &[u8]) -> bool
Write memory to an absolute address Read more
Source§impl ReadWrite for Pointer
impl ReadWrite for Pointer
Source§fn read_i8_rel(&self, address: Option<usize>) -> i8
fn read_i8_rel(&self, address: Option<usize>) -> i8
Relatively read an i8 from an optional offset Read more
Source§fn read_i32_rel(&self, address: Option<usize>) -> i32
fn read_i32_rel(&self, address: Option<usize>) -> i32
Relatively read an i32 from an optional offset Read more
Source§fn read_i64_rel(&self, address: Option<usize>) -> i64
fn read_i64_rel(&self, address: Option<usize>) -> i64
Relatively read an i64 from an optional offset Read more
Source§fn read_u8_rel(&self, address: Option<usize>) -> u8
fn read_u8_rel(&self, address: Option<usize>) -> u8
Relatively read an u8 from an optional offset Read more
Source§fn read_u32_rel(&self, address: Option<usize>) -> u32
fn read_u32_rel(&self, address: Option<usize>) -> u32
Relatively read an u32 from an optional offset Read more
Source§fn read_u64_rel(&self, address: Option<usize>) -> u64
fn read_u64_rel(&self, address: Option<usize>) -> u64
Relatively read an u64 from an optional offset Read more
Source§fn read_f32_rel(&self, address: Option<usize>) -> f32
fn read_f32_rel(&self, address: Option<usize>) -> f32
Relatively read an f32 from an optional offset Read more
Source§fn read_f64_rel(&self, address: Option<usize>) -> f64
fn read_f64_rel(&self, address: Option<usize>) -> f64
Relatively read an f64 from an optional offset Read more
Source§fn read_bool_rel(&self, address: Option<usize>) -> bool
fn read_bool_rel(&self, address: Option<usize>) -> bool
Relatively read a bool from an optional offset.
A single byte is read from the resolved address, the value of the bool is true if this byte is non-zero. Read more
Source§fn write_i8_rel(&self, address: Option<usize>, value: i8)
fn write_i8_rel(&self, address: Option<usize>, value: i8)
Relatively write an i8 to an optional offset Read more
Source§fn write_i32_rel(&self, address: Option<usize>, value: i32)
fn write_i32_rel(&self, address: Option<usize>, value: i32)
Relatively write an i32 to an optional offset Read more
Source§fn write_i64_rel(&self, address: Option<usize>, value: i64)
fn write_i64_rel(&self, address: Option<usize>, value: i64)
Relatively write an i64 to an optional offset Read more
Source§fn write_u8_rel(&self, address: Option<usize>, value: u8)
fn write_u8_rel(&self, address: Option<usize>, value: u8)
Relatively write an u8 to an optional offset Read more
Source§fn write_u32_rel(&self, address: Option<usize>, value: u32)
fn write_u32_rel(&self, address: Option<usize>, value: u32)
Relatively write an u32 to an optional offset Read more
Source§fn write_u64_rel(&self, address: Option<usize>, value: u64)
fn write_u64_rel(&self, address: Option<usize>, value: u64)
Relatively write an u64 to an optional offset Read more
Auto Trait Implementations§
impl Freeze for Pointer
impl !RefUnwindSafe for Pointer
impl !Send for Pointer
impl !Sync for Pointer
impl Unpin for Pointer
impl !UnwindSafe for Pointer
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