Skip to main content

user

Function user 

Source
pub fn user() -> Result<User>
Expand description

The effective user this process runs as now.

On Linux and macOS the name comes from the system’s user database (NSS), which can read /etc/passwd or, with directory-service users, wait on the network: keep it off hot paths. A user id without an entry gives its number as the name.

§Errors

Os when the user cannot be looked up.