Module whoami::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§

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