Trait tauri_utils::process::ProcessExt[][src]

pub trait ProcessExt {
    pub fn new(pid: i32, parent: Option<i32>, start_time: u64) -> Self;
pub fn kill(&self, signal: Signal) -> bool;
pub fn name(&self) -> &str;
pub fn cmd(&self) -> &[String];
pub fn exe(&self) -> &Path;
pub fn pid(&self) -> i32;
pub fn environ(&self) -> &[String];
pub fn cwd(&self) -> &Path;
pub fn root(&self) -> &Path;
pub fn memory(&self) -> u64;
pub fn virtual_memory(&self) -> u64;
pub fn parent(&self) -> Option<i32>;
pub fn status(&self) -> ProcessStatus;
pub fn start_time(&self) -> u64;
pub fn cpu_usage(&self) -> f32; }

Contains all the methods of the Process struct.

Required methods

pub fn new(pid: i32, parent: Option<i32>, start_time: u64) -> Self[src]

Create a new process only containing the given information.

On windows, the start_time argument is ignored.

pub fn kill(&self, signal: Signal) -> bool[src]

Sends the given signal to the process.

pub fn name(&self) -> &str[src]

Returns the name of the process.

pub fn cmd(&self) -> &[String][src]

Returns the command line.

pub fn exe(&self) -> &Path[src]

Returns the path to the process.

pub fn pid(&self) -> i32[src]

Returns the pid of the process.

pub fn environ(&self) -> &[String][src]

Returns the environment of the process.

Always empty on Windows except for current process.

pub fn cwd(&self) -> &Path[src]

Returns the current working directory.

Always empty on Windows.

pub fn root(&self) -> &Path[src]

Returns the path of the root directory.

Always empty on Windows.

pub fn memory(&self) -> u64[src]

Returns the memory usage (in KiB).

pub fn virtual_memory(&self) -> u64[src]

Returns the virtual memory usage (in KiB).

pub fn parent(&self) -> Option<i32>[src]

Returns the parent pid.

pub fn status(&self) -> ProcessStatus[src]

Returns the status of the processus.

pub fn start_time(&self) -> u64[src]

Returns the time of process launch (in seconds).

pub fn cpu_usage(&self) -> f32[src]

Returns the total CPU usage.

Loading content...

Implementors

impl ProcessExt for Process[src]

pub fn status(&self) -> ProcessStatus[src]

Returns the status of the processus (idle, run, zombie, etc). None means that sysinfo doesn’t have enough rights to get this information.

Loading content...