pub fn get_current_uid() -> uid_t
Returns the user ID for the user running the process.
getuid
use uzers::get_current_uid; println!("The ID of the current user is {}", get_current_uid());