TryIntoProcessHandle

Trait TryIntoProcessHandle 

Source
pub trait TryIntoProcessHandle {
    // Required method
    fn try_into_process_handle(&self) -> Result<ProcessHandle>;
}
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§

Source

fn try_into_process_handle(&self) -> Result<ProcessHandle>

Attempt to turn a type into a ProcessHandle. Whilst Linux provides the same type for Pids and ProcessHandles, Windows and macOS do not. As such, you need to ensure that try_into_process_handle is called on all Pids to ensure cross-platform capabilities.

§Errors

Returns an error if the type cannot be turned into a ProcessHandle

Implementations on Foreign Types§

Source§

impl TryIntoProcessHandle for Child

This TryIntoProcessHandle impl simply calls the TryIntoProcessHandle impl for Pid.

Implementors§

Source§

impl TryIntoProcessHandle for Pid

Pid can be turned into a ProcessHandle with task_for_pid.

Source§

impl TryIntoProcessHandle for ProcessHandle