Skip to main content

extract_required_string_field

Function extract_required_string_field 

Source
fn extract_required_string_field<'a>(
    object: &'a CanonicalJsonObject,
    field: &'a str,
) -> Result<&'a String>
Expand description

Extract the required string field with the given name from the given canonical JSON object.

Returns Ok(value) if the field is present and a valid string and Err(_) if the field is missing, not a string or its length is bigger than [ID_MAX_BYTES].