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)>
Returns 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()
impl Copy for Utf8Error
impl Eq for Utf8Error
impl StructuralPartialEq for Utf8Error
Auto Trait Implementations§
impl Freeze for Utf8Error
impl RefUnwindSafe for Utf8Error
impl Send for Utf8Error
impl Sync for Utf8Error
impl Unpin for Utf8Error
impl UnwindSafe for Utf8Error
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)