ProcessAttachInto

Trait ProcessAttachInto 

Source
pub trait ProcessAttachInto: Sized {
    type ProcessType;

    // Required methods
    fn attach_into(self, process_name: &str) -> Option<Self::ProcessType>;
    fn attach_into_pid(self, pid: u32) -> Option<Self::ProcessType>;
    fn attach_into_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 while consuming Self

Required Associated Types§

Source

type ProcessType

The type of the resulting process after attaching

Required Methods§

Source

fn attach_into(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_into_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_into_current(self) -> Self::ProcessType

Attaches to the current process, consuming Self

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> ProcessAttachInto for T
where T: GetContext + 'static,