pub fn validate(bytes: &[u8]) -> Validity
Validate bytes as UTF-8, reporting the failure location on error.
bytes
Uses simdutf8::compat::from_utf8, whose std-compatible error type carries valid_up_to() and error_len().
simdutf8::compat::from_utf8
std
valid_up_to()
error_len()