1 // Take a look at the license at the top of the repository in the LICENSE file.
5 use crate::{DiskUsage, Gid, Pid, ProcessExt, ProcessStatus, Signal, Uid}
;
7 #[doc = include_str!("../../../md_doc/process.md")]
10 impl ProcessExt
for Process
{
11 fn kill_with(&self, _signal
: Signal
) -> Option
<bool
> {
15 fn name(&self) -> &str {
19 fn cmd(&self) -> &[String
] {
23 fn exe(&self) -> &Path
{
27 fn pid(&self) -> Pid
{
31 fn environ(&self) -> &[String
] {
35 fn cwd(&self) -> &Path
{
39 fn root(&self) -> &Path
{
43 fn memory(&self) -> u64 {
47 fn virtual_memory(&self) -> u64 {
51 fn parent(&self) -> Option
<Pid
> {
55 fn status(&self) -> ProcessStatus
{
56 ProcessStatus
::Unknown(0)
59 fn start_time(&self) -> u64 {
63 fn run_time(&self) -> u64 {
67 fn cpu_usage(&self) -> f32 {
71 fn disk_usage(&self) -> DiskUsage
{
75 fn user_id(&self) -> Option
<&Uid
> {
79 fn group_id(&self) -> Option
<Gid
> {