Skip to main content

required_str

Function required_str 

Source
pub fn required_str<'a>(
    map: &'a Expr,
    name: &str,
    context: &str,
) -> Result<&'a str>
Expand description

Read a required string-valued field, with a context label for diagnostics. This is the one home for the string_field/required_field-style readers that coerce to &str; callers wanting a domain-specific error keep a thin local wrapper. Accepts either key form, matching field_any.