pub fn validate_compact(values: &CompactValues) -> Result<(), ApplyError>Expand description
Checks that the process environment can hold every key and value in a
CompactValues map.
Runs the same checks as validate in sorted key order without modifying
the process environment.
§Errors
Returns the first ApplyError found.
§Examples
use adotenv::parse_values_compact;
use adotenv_process::{validate_compact, ApplyError};
let values = parse_values_compact("PORT=8080\nTOKEN=abc\0def\n")?;
assert_eq!(
validate_compact(&values),
Err(ApplyError::InvalidValue { key: "TOKEN".to_string() })
);