pub fn load_var<T: FromStr, S: BuildHasher>(
var_name: &'static str,
hashmap: Option<&HashMap<String, String, S>>,
) -> Result<T, Error>Expand description
Load an environment variable by name and parse it into type T.
This function can also use a hashmap as a fallback or for testing purposes.
ยงErrors
- Environment variable is not present
- Parsing failed