[−][src]Trait pwner::Process
The trait returned by PipedSpwner::spawn_owned()
.
All implementations of [PipedSpawner
] return a concrete instance capable of read/write.
Required methods
#[must_use]fn id(&self) -> u32
Returns the OS-assigned process identifier associated with this child.
Examples
Basic usage:
use std::process::Command; use pwner::{ Spawner, Process }; let mut command = Command::new("ls"); if let Ok(child) = command.spawn_owned() { println!("Child's ID is {}", child.id()); } else { println!("ls command didn't start"); }
Implementors
impl Process for Process
[src]
#[must_use]fn id(&self) -> u32
[src]
Returns the OS-assigned process identifier associated with this child.
Examples
Basic usage:
use std::process::Command; use pwner::{ Spawner, Process }; let mut command = Command::new("ls"); if let Ok(child) = command.spawn_owned() { println!("Child's ID is {}", child.id()); } else { println!("ls command didn't start"); }