Skip to main content

env_var_or_none

Function env_var_or_none 

Source
pub fn env_var_or_none(key: &str) -> Option<String>
Expand description

Read an environment variable, returning None for a missing or whitespace-only value. The returned value is not trimmed — callers that need a trimmed value should trim it themselves, matching how this distinguishes “unset” from “set to something”.