#[non_exhaustive]pub enum UnescapeErrorKind {
InvalidEscape(InvalidEscapeError),
InvalidHex(InvalidHexError),
UnexpectedEof,
LoneSurrogate(LoneSurrogateError),
}
Expand description
The specific kind of error that can occur during JSON string unescaping.
This enum covers all possible failures described by the JSON standard for string contents.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
InvalidEscape(InvalidEscapeError)
Found a backslash followed by an unexpected character (e.g., \x
).
InvalidHex(InvalidHexError)
Found \u
but the following characters were not 4 valid hex digits.
UnexpectedEof
Input ended unexpectedly while parsing an escape sequence (e.g., \u12
).
LoneSurrogate(LoneSurrogateError)
The \u
sequence yielded a lone high or low surrogate without a matching pair.
Trait Implementations§
Source§impl Clone for UnescapeErrorKind
impl Clone for UnescapeErrorKind
Source§fn clone(&self) -> UnescapeErrorKind
fn clone(&self) -> UnescapeErrorKind
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 UnescapeErrorKind
impl Debug for UnescapeErrorKind
Source§impl PartialEq for UnescapeErrorKind
impl PartialEq for UnescapeErrorKind
impl Copy for UnescapeErrorKind
impl Eq for UnescapeErrorKind
impl StructuralPartialEq for UnescapeErrorKind
Auto Trait Implementations§
impl Freeze for UnescapeErrorKind
impl RefUnwindSafe for UnescapeErrorKind
impl Send for UnescapeErrorKind
impl Sync for UnescapeErrorKind
impl Unpin for UnescapeErrorKind
impl UnwindSafe for UnescapeErrorKind
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