Trait memlib::MemoryReadExt
source · [−]pub trait MemoryReadExt: MemoryRead {
fn try_read<T: Pod>(&self, address: u64) -> Option<T> { ... }
unsafe fn try_read_unchecked<T>(&self, address: u64) -> Option<T> { ... }
fn read<T: Pod>(&self, address: u64) -> T { ... }
fn try_read_bytes_const<const LEN: usize>(
&self,
address: u64
) -> Option<[u8; LEN]> { ... }
fn try_read_bytes_into_chunked<const CHUNK_SIZE: usize>(
&self,
address: u64,
buf: &mut [u8]
) -> Option<()> { ... }
fn try_read_bytes_into_chunked_fallible<const CHUNK_SIZE: usize>(
&self,
address: u64,
buf: &mut [u8]
) -> Option<usize> { ... }
}
Expand description
Extension trait for supplying generic util methods for MemoryRead
Provided Methods
Reads bytes from the process at the specified address into a value of type T. Returns None if the address is not valid
sourceunsafe fn try_read_unchecked<T>(&self, address: u64) -> Option<T>
unsafe fn try_read_unchecked<T>(&self, address: u64) -> Option<T>
Reads any type T from the process without the restriction of Pod
Reads bytes from the process at the specified address into a value of type T. Panics if the address is not valid
Reads a const number of bytes from the process returning a stack allocated array.
Reads bytes from the process in chunks with the specified size