get_env

Function get_env 

Source
pub fn get_env(name: &str) -> Result<Option<String>, String>
Expand description

Gets the environment variable named name if it is set.

Returns None if the variable is unset, is empty, or contains only whitespace.

Trims whitespace from the start and end of the value before returning it.

ยงErrors

Returns an error if the environment variable value is not UTF-8.