Skip to main content

parse_required

Function parse_required 

Source
pub fn parse_required<T>(
    key: &str,
    expected: &'static str,
) -> Result<T, EnvError>
where T: FromStr,
Expand description

Reads and parses a variable which must be present and non-blank.

ยงErrors

As required, plus EnvError::Invalid if the value does not parse.