Skip to main content

Module extras

Module extras 

Source
Expand description

Ready-made Capturable types for ambient process and environment state.

Each type snapshots a piece of context — the working directory, home directory, command-line arguments, or a named environment variable — into an error through a #[oopsie(capture)] field. Capturing never fails: an unavailable directory or variable is recorded as None.

Requires the extras feature.

Modules§

env_vars
Ready-made EnvVarOpt aliases for common variables, plus the make_env_var! macro for declaring your own.

Structs§

CurrentDirOpt
The current working directory at the time the error was built, or None if it could not be read.
EnvArgs
The process’s command-line arguments at the time the error was built.
EnvVarOpt
The value of the environment variable named by E at the time the error was built, or None if it was unset.
HomeDirOpt
The user’s home directory at the time the error was built, or None if it could not be determined.

Traits§

EnvVarName
Names the environment variable that an EnvVarOpt reads.