Skip to main content

enabled

Function enabled 

Source
pub fn enabled(var: &str) -> bool
Expand description

Whether the named environment switch is set to a truthy value now.

Reads the live environment on every call rather than caching. A switch consulted once at startup would ignore a .env loaded later, and the tests that set one per case would leak into each other.