ProcessAttach

Trait ProcessAttach 

Source
pub trait ProcessAttach: Sized {
    type ProcessType<'a>
       where Self: 'a;

    // Required methods
    fn attach(&self, process_name: &str) -> Option<Self::ProcessType<'_>>;
    fn attach_pid(&self, pid: u32) -> Option<Self::ProcessType<'_>>;
    fn attach_current(&self) -> Self::ProcessType<'_>;
}
Expand description

Represents a type that can attach to a process and return a struct that implements MemoryRead, MemoryWrite, and ModuleList

Required Associated Types§

Source

type ProcessType<'a> where Self: 'a

The type of the resulting process after attaching

Required Methods§

Source

fn attach(&self, process_name: &str) -> Option<Self::ProcessType<'_>>

Attaches to a process of name process_name. If no process is found None is returned. If there is an error internally, this function should panic

Source

fn attach_pid(&self, pid: u32) -> Option<Self::ProcessType<'_>>

Attaches to a process by a pid. If the pid does not exist, this will return None

Source

fn attach_current(&self) -> Self::ProcessType<'_>

Attaches to the current process

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T> ProcessAttach for T
where T: GetContext + 'static,

Source§

type ProcessType<'a> = AttachedProcess<'a, T> where Self: 'a