pub struct Process {
pub uid: u32,
pub gid: u32,
pub tasks: HashMap<i32, Process>,
/* private fields */
}
Expand description
Struct containing a process’ information.
Fields§
§uid: u32
User id of the process owner.
gid: u32
Group id of the process owner.
tasks: HashMap<i32, Process>
Tasks run by this process.
Trait Implementations§
Source§impl ProcessExt for Process
impl ProcessExt for Process
Source§fn status(&self) -> ProcessStatus
fn status(&self) -> ProcessStatus
Returns the status of the processus (idle, run, zombie, etc). None
means that
sysinfo
doesn’t have enough rights to get this information.
Source§fn new(pid: i32, parent: Option<i32>, start_time: u64) -> Process
fn new(pid: i32, parent: Option<i32>, start_time: u64) -> Process
Create a new process only containing the given information. Read more
Source§fn virtual_memory(&self) -> u64
fn virtual_memory(&self) -> u64
Returns the virtual memory usage (in KiB).
Source§fn start_time(&self) -> u64
fn start_time(&self) -> u64
Returns the time of process launch (in seconds).
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