Function build_data::get_env[][src]

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

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 valid utf-8.