pub fn effective_uid() -> u32
unix_process_user_group_ids
Returns the effective user ID of the current process.
#![feature(unix_process_user_group_ids)] use std::os::unix::process; fn main() { let euid = process::effective_uid(); println!("The current process has effective UID {}", euid); }