Trait titanium::desktop::memory::TryIntoProcessHandle
pub trait TryIntoProcessHandle {
// Required method
fn try_into_process_handle(&self) -> Result<(i32, Architecture), Error>;
}
Expand description
A trait that attempts to turn some type into a ProcessHandle
so memory can be either copied
or placed into it.
Required Methods§
fn try_into_process_handle(&self) -> Result<(i32, Architecture), Error>
fn try_into_process_handle(&self) -> Result<(i32, Architecture), Error>
Attempt to turn a type into a ProcessHandle
. Whilst Linux provides the same type for
Pid
s and ProcessHandle
s, Windows and macOS do not. As such, you need to ensure that
try_into_process_handle
is called on all Pid
s to ensure cross-platform capabilities.
Errors
Returns an error if the type cannot be turned into a ProcessHandle
Implementations on Foreign Types§
§impl TryIntoProcessHandle for Pid
impl TryIntoProcessHandle for Pid
fn try_into_process_handle(&self) -> Result<(i32, Architecture), Error>
§impl TryIntoProcessHandle for i32
impl TryIntoProcessHandle for i32
fn try_into_process_handle(&self) -> Result<(i32, Architecture), Error>
§impl TryIntoProcessHandle for (i32, Architecture)
impl TryIntoProcessHandle for (i32, Architecture)
fn try_into_process_handle(&self) -> Result<(i32, Architecture), Error>
§impl TryIntoProcessHandle for Child
impl TryIntoProcessHandle for Child
A Child
always has a pid, which is all we need on Linux.