本文簡要介紹rust語言中 Function std::process::id
的用法。
用法
pub fn id() -> u32
返回與此進程關聯的OS-assigned 進程標識符。
例子
基本用法:
use std::process;
println!("My pid is {}", process::id());
相關用法
- Rust identity用法及代碼示例
- Rust i64.overflowing_add_unsigned用法及代碼示例
- Rust i128.log2用法及代碼示例
- Rust i16.log10用法及代碼示例
- Rust i128.checked_div用法及代碼示例
- Rust i64.abs用法及代碼示例
- Rust i16.wrapping_add_unsigned用法及代碼示例
- Rust i128.checked_next_multiple_of用法及代碼示例
- Rust isize.unstable_div_floor用法及代碼示例
- Rust i32.saturating_mul用法及代碼示例
- Rust isize.swap_bytes用法及代碼示例
- Rust i128.overflowing_pow用法及代碼示例
- Rust i64.checked_add用法及代碼示例
- Rust i16.wrapping_sub用法及代碼示例
- Rust i128.overflowing_sub用法及代碼示例
- Rust i64.saturating_abs用法及代碼示例
- Rust isize.from_ne_bytes用法及代碼示例
- Rust i16.wrapping_shr用法及代碼示例
- Rust i128.overflowing_shr用法及代碼示例
- Rust i128.overflowing_shl用法及代碼示例
- Rust i16.unstable_div_floor用法及代碼示例
- Rust i16.wrapping_abs用法及代碼示例
- Rust i128.checked_sub_unsigned用法及代碼示例
- Rust i32.checked_log2用法及代碼示例
- Rust i128.overflowing_div用法及代碼示例
注:本文由純淨天空篩選整理自rust-lang.org大神的英文原創作品 Function std::process::id。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。