Skip to main content

ProcessReader

Struct ProcessReader 

Source
pub struct ProcessReader<'a> { /* private fields */ }

Implementations§

Source§

impl<'a> ProcessReader<'a>

Source

pub fn new(process_inspector: &'a ProcessInspector) -> Self

Source

pub fn for_virtual_mem(process_inspector: &'a ProcessInspector) -> Self

Source

pub fn for_file(process_inspector: &'a ProcessInspector) -> Result<Self, Error>

Source

pub fn for_ptrace(process_inspector: &'a ProcessInspector) -> Self

Source

pub fn read( &self, src: usize, dst: &mut [u8], ) -> Result<usize, CopyFromProcessError>

Read memory from the process into the given buffer.

Returns the number of bytes read.

Source

pub fn find_module( &self, module_name: &str, ) -> Result<ProcessModuleMemoryReader<'_>, FindModuleError>

Find the address at which a module with the given name is loaded in the process.

Source§

impl ProcessReader<'_>

Source

pub fn read_to_vec( &self, src: usize, length: NonZeroUsize, ) -> Result<Vec<u8>, CopyFromProcessError>

Source

pub fn read_all( &self, src: usize, dst: &mut [u8], ) -> Result<(), CopyFromProcessError>

Source

pub fn read_all_to_vec( &self, src: usize, length: usize, ) -> Result<Vec<u8>, CopyFromProcessError>

Source

pub fn copy_nul_terminated_string( &self, address: usize, ) -> Result<CString, CopyFromProcessError>

Source

pub fn copy_object_uninit<T>( &self, src: usize, ) -> Result<MaybeUninit<T>, CopyFromProcessError>

Source

pub unsafe fn copy_object<T>( &self, src: usize, ) -> Result<T, CopyFromProcessError>

§Safety

The caller must ensure that the object will be in an initialized, valid state.

Source

pub fn copy_array_uninit<T>( &self, src: usize, num: usize, ) -> Result<Vec<MaybeUninit<T>>, CopyFromProcessError>

Source

pub unsafe fn copy_array<T>( &self, src: usize, num: usize, ) -> Result<Vec<T>, CopyFromProcessError>

§Safety

The caller must ensure that the objects will be in an initialized, valid state.

Trait Implementations§

Source§

impl<'a> Debug for ProcessReader<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> !Freeze for ProcessReader<'a>

§

impl<'a> !RefUnwindSafe for ProcessReader<'a>

§

impl<'a> !Send for ProcessReader<'a>

§

impl<'a> !Sync for ProcessReader<'a>

§

impl<'a> !UnwindSafe for ProcessReader<'a>

§

impl<'a> Unpin for ProcessReader<'a>

§

impl<'a> UnsafeUnpin for ProcessReader<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.