[][src]Function users::get_current_uid

pub fn get_current_uid() -> uid_t

Returns the user ID for the user running the process.

libc functions used

Examples

use users::get_current_uid;

println!("The ID of the current user is {}", get_current_uid());