Module fallible

Source
Expand description

Fallible versions of the whoami APIs.

Some of the functions in the root module will return “Unknown” or “localhost” on error. This might not be desirable in some situations. The functions in this module all return a Result.

Functions§

account
Get the user’s account name; usually just the username, but may include an account server hostname.
account_os
Get the user’s account name; usually just the username, but may include an account server hostname.
devicename
Get the device name (also known as “Pretty Name”).
devicename_os
Get the device name (also known as “Pretty Name”).
distro
Get the name of the operating system distribution and (possibly) version.
hostname
Get the host device’s hostname.
realname
Get the user’s real (full) name.
realname_os
Get the user’s real (full) name.
username
Get the user’s username.
username_os
Get the user’s username.