[−][src]Function kankyo::key
pub fn key<T: AsRef<OsStr>>(name: T) -> Option<String>
Loads a key from the current environment. This is more or less an alias of
std::env::var
, but the benefit - slightly - is one less possible use
statement.
Examples
Retrieve a key from the environment:
try!(kankyo::load(false)); if let Some(value) = kankyo::key("MY_KEY") { println!("The value of MY_KEY is: {}", value); }