Skip to main content

text_form_within

Function text_form_within 

Source
pub fn text_form_within(
    value: &Value,
    max_bytes: usize,
) -> Result<Option<String>, DataError>
Expand description

Returns value’s text form when its UTF-8 takes at most max_bytes bytes, and None otherwise.

§Errors

DataError::NotData on reaching a value that is not data.