pub fn is_equal<K: AsRef<OsStr>>(key: K, value: &str) -> bool
Returns true if the provided environment variable is defined and equals the provided value.
key
- The environment variable name
value
- The value to check
fn main() {
envmnt::set("MY_ENV_VAR", "SOME VALUE");
let same = envmnt::is_equal("MY_ENV_VAR", "SOME VALUE");
assert!(same);
}