pub enum DecodeErrorKind {
MalformedSequence,
TruncatedSequence,
UnpairedSurrogate,
DisallowedByte,
}Expand description
The kind of problem a DecodeError reports.
Variants§
MalformedSequence
A byte sequence that can never be valid in this encoding (e.g. a UTF-8 continuation byte in a position where a lead byte was expected, or an overlong encoding).
TruncatedSequence
The input ended in the middle of a multi-byte sequence and the caller signaled last = true, so no further bytes will arrive to complete it.
UnpairedSurrogate
A UTF-16 high surrogate was not followed by a low surrogate (or vice versa).
DisallowedByte
A byte outside the encoding’s repertoire was found (e.g. 0x80..=0xFF in
Encoding::Ascii).
Trait Implementations§
Source§impl Clone for DecodeErrorKind
impl Clone for DecodeErrorKind
Source§fn clone(&self) -> DecodeErrorKind
fn clone(&self) -> DecodeErrorKind
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for DecodeErrorKind
Source§impl Debug for DecodeErrorKind
impl Debug for DecodeErrorKind
impl Eq for DecodeErrorKind
Source§impl PartialEq for DecodeErrorKind
impl PartialEq for DecodeErrorKind
impl StructuralPartialEq for DecodeErrorKind
Auto Trait Implementations§
impl Freeze for DecodeErrorKind
impl RefUnwindSafe for DecodeErrorKind
impl Send for DecodeErrorKind
impl Sync for DecodeErrorKind
impl Unpin for DecodeErrorKind
impl UnsafeUnpin for DecodeErrorKind
impl UnwindSafe for DecodeErrorKind
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