pub struct Utf8Error { /* private fields */ }
Expand description
UTF-8 error information compatible with std::str::Utf8Error
.
Contains information on the location of the encountered validation error and the length of the invalid UTF-8 sequence.
Implementations§
source§impl Utf8Error
impl Utf8Error
sourcepub fn valid_up_to(&self) -> usize
pub fn valid_up_to(&self) -> usize
Analogue to std::str::Utf8Error::valid_up_to()
.
…
sourcepub fn error_len(&self) -> Option<usize>
pub fn error_len(&self) -> Option<usize>
Analogue to std::str::Utf8Error::error_len()
.
…
Trait Implementations§
source§impl Error for Utf8Error
impl Error for Utf8Error
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()