Function id
#[must_use]
pub fn id() -> u32
Returns the OS-assigned process identifier associated with this process.
Examples
use std::process;
println!("My pid is {}", process::id());
id#[must_use]
pub fn id() -> u32
Returns the OS-assigned process identifier associated with this process.
use std::process;
println!("My pid is {}", process::id());