Function envconfig::load_var [−][src]
pub fn load_var<T: FromStr>(var_name: &'static str) -> Result<T, Error>
Load a nenvironment variable by name and parse it into type T
.
The function is used by envconfig_derive
to implement init()
.
It returns Error
in the following cases:
- Environment variable is not present
- Parsing failed