pub struct Process {
pub tasks: HashMap<Pid, Process>,
/* private fields */
}Expand description
Fields§
§tasks: HashMap<Pid, Process>Tasks run by this process.
Trait Implementations§
Source§impl ProcessExt for Process
impl ProcessExt for Process
Source§fn kill_with(&self, signal: Signal) -> Option<bool>
fn kill_with(&self, signal: Signal) -> Option<bool>
Sends the given
signal to the process. If the signal doesn’t exist on this platform,
it’ll do nothing and will return None. Otherwise it’ll return if the signal was sent
successfully. Read moreSource§fn virtual_memory(&self) -> u64
fn virtual_memory(&self) -> u64
Returns the virtual memory usage (in bytes). Read more
Source§fn status(&self) -> ProcessStatus
fn status(&self) -> ProcessStatus
Returns the status of the process. Read more
Source§fn start_time(&self) -> u64
fn start_time(&self) -> u64
Returns the time where the process was started (in seconds) from epoch. Read more
Source§fn run_time(&self) -> u64
fn run_time(&self) -> u64
Returns for how much time the process has been running (in seconds). Read more
Source§fn cpu_usage(&self) -> f32
fn cpu_usage(&self) -> f32
Returns the total CPU usage (in %). Notice that it might be bigger than 100 if run on a
multi-core machine. Read more
Source§fn disk_usage(&self) -> DiskUsage
fn disk_usage(&self) -> DiskUsage
Returns number of bytes read and written to disk. Read more
Source§fn user_id(&self) -> Option<&Uid>
fn user_id(&self) -> Option<&Uid>
Returns the ID of the owner user of this process or
None if this information couldn’t
be retrieved. If you want to get the User from it, take a look at
SystemExt::get_user_by_id. Read moreSource§fn effective_user_id(&self) -> Option<&Uid>
fn effective_user_id(&self) -> Option<&Uid>
Returns the user ID of the effective owner of this process or
None if this information
couldn’t be retrieved. If you want to get the User from it, take a look at
SystemExt::get_user_by_id. Read moreSource§fn effective_group_id(&self) -> Option<Gid>
fn effective_group_id(&self) -> Option<Gid>
Returns the effective group ID of the process. Read more
Auto Trait Implementations§
impl Freeze for Process
impl RefUnwindSafe for Process
impl Send for Process
impl Sync for Process
impl Unpin for Process
impl UnwindSafe for Process
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more