|
OXY API 1.0
OXY API Library Documentation
|
Function object to get the value of an environment variable. More...
#include <envvar.hpp>
Public Member Functions | |
| result< maybe< std::string > > | operator() (std::string const &name) const |
Function object to get the value of an environment variable.
This functor provides an overload to retrieve the value of a specified environment variable. It returns a result type that contains a maybe<std::string> holding the value of the environment variable if it exists, or an empty maybe if the variable is not set. In case of an error during retrieval, it returns an error code. This allows for safe access to environment variables, providing feedback on any issues encountered during the process.