Skip to main content

effective_uid

Function effective_uid 

Source
pub fn effective_uid() -> u32
🔬This is a nightly-only experimental API. (unix_process_user_group_ids #166252)
Available on Unix only.
Expand description

Returns the effective user ID of the current process.

§Example

#![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);
}