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§
Sourcetype ProcessType<'a>
where
Self: 'a
type ProcessType<'a> where Self: 'a
The type of the resulting process after attaching
Required Methods§
Sourcefn attach(&self, process_name: &str) -> Option<Self::ProcessType<'_>>
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
Sourcefn attach_pid(&self, pid: u32) -> Option<Self::ProcessType<'_>>
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
Sourcefn attach_current(&self) -> Self::ProcessType<'_>
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.