[−][src]Function envmnt::get_or_panic
pub fn get_or_panic<K: AsRef<OsStr>>(key: K) -> String
Returns the environment variable value. If the variable is not defined, this function will panic.
Arguments
key- The environment variable name
Example
extern crate envmnt; fn main() { envmnt::set("MY_ENV_VAR", "SOME VALUE"); let value = envmnt::get_or_panic("MY_ENV_VAR"); println!("Env Value: {}", &value); }