Module env

Source

Functionsยง

get
Get the value of the environment variable key as T. If the variable is not set or cannot be parsed, it panics with a message.
get_optional
Get the value of the environment variable key as T. If the variable is not set or cannot be parsed, it returns None. /// # Example
get_optional_or
Get the value of the environment variable key as T. If the variable is not set or cannot be parsed, it returns default.
get_optional_or_else
Get the value of the environment variable key as T. If the variable is not set or cannot be parsed, it returns the result of f.
get_or
Get the value of the environment variable key as T. If the variable is not set or cannot be parsed, it returns default.
get_or_else
Get the value of the environment variable key as T. If the variable is not set or cannot be parsed, it returns the result of f.
get_or_else_with_hashmap
Get the value of the environment variable key as T from a provided hashmap. If the variable is not set or cannot be parsed, it returns the result of f.
get_or_with_hashmap
Get the value of the environment variable key as T from a provided hashmap. If the variable is not set or cannot be parsed, it returns default.