Trait tauri_utils::process::ProcessExt [−][src]
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.
Implementors
impl ProcessExt for Process
[src]
pub fn new(pid: i32, parent: Option<i32>, start_time: u64) -> Process
[src]
pub fn kill(&self, signal: Signal) -> bool
[src]
pub fn name(&self) -> &str
[src]
pub fn cmd(&self) -> &[String]
[src]
pub fn exe(&self) -> &Path
[src]
pub fn pid(&self) -> i32
[src]
pub fn environ(&self) -> &[String]
[src]
pub fn cwd(&self) -> &Path
[src]
pub fn root(&self) -> &Path
[src]
pub fn memory(&self) -> u64
[src]
pub fn virtual_memory(&self) -> u64
[src]
pub fn parent(&self) -> Option<i32>
[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.