pub enum EncodingError {
InvalidBytes,
InvalidCodepoint(u32),
TruncatedUtf16,
TruncatedUtf32,
}Expand description
Error produced when decode cannot convert the byte stream to UTF-8.
Variants§
InvalidBytes
Input bytes are not valid for the detected encoding.
InvalidCodepoint(u32)
A UTF-16 or UTF-32 sequence contains an unpaired surrogate or an out-of-range codepoint.
TruncatedUtf16
UTF-16 input has an odd number of bytes.
TruncatedUtf32
UTF-32 input length is not a multiple of four.
Trait Implementations§
Source§impl Clone for EncodingError
impl Clone for EncodingError
Source§fn clone(&self) -> EncodingError
fn clone(&self) -> EncodingError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EncodingError
impl Debug for EncodingError
Source§impl Display for EncodingError
impl Display for EncodingError
Source§impl PartialEq for EncodingError
impl PartialEq for EncodingError
impl Eq for EncodingError
impl StructuralPartialEq for EncodingError
Auto Trait Implementations§
impl Freeze for EncodingError
impl RefUnwindSafe for EncodingError
impl Send for EncodingError
impl Sync for EncodingError
impl Unpin for EncodingError
impl UnsafeUnpin for EncodingError
impl UnwindSafe for EncodingError
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