pub enum JsonParseError<E = Infallible> {
Stream(usize, E),
Unexpected(usize, Option<char>),
InvalidUnicodeCodePoint(Span, u32),
MissingLowSurrogate(Span, u16),
InvalidLowSurrogate(Span, u16, u32),
InvalidUtf8(usize),
}Expand description
Parse error.
Variants§
Stream(usize, E)
Stream error.
The first parameter is the byte index at which the error occurred.
Unexpected(usize, Option<char>)
Unexpected character or end of stream.
The first parameter is the byte index at which the error occurred.
InvalidUnicodeCodePoint(Span, u32)
Invalid unicode codepoint.
The first parameter is the span at which the error occurred.
MissingLowSurrogate(Span, u16)
Missing low surrogate in a string.
The first parameter is the byte index at which the error occurred.
InvalidLowSurrogate(Span, u16, u32)
Invalid low surrogate in a string.
The first parameter is the span at which the error occurred.
InvalidUtf8(usize)
UTF-8 encoding error.
Implementations§
Trait Implementations§
Source§impl<E: Debug> Debug for JsonParseError<E>
impl<E: Debug> Debug for JsonParseError<E>
Source§impl<E: Display> Display for JsonParseError<E>
impl<E: Display> Display for JsonParseError<E>
Source§impl<E: 'static + Error> Error for JsonParseError<E>
impl<E: 'static + Error> Error for JsonParseError<E>
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()
Auto Trait Implementations§
impl<E> Freeze for JsonParseError<E>where
E: Freeze,
impl<E> RefUnwindSafe for JsonParseError<E>where
E: RefUnwindSafe,
impl<E> Send for JsonParseError<E>where
E: Send,
impl<E> Sync for JsonParseError<E>where
E: Sync,
impl<E> Unpin for JsonParseError<E>where
E: Unpin,
impl<E> UnsafeUnpin for JsonParseError<E>where
E: UnsafeUnpin,
impl<E> UnwindSafe for JsonParseError<E>where
E: UnwindSafe,
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> JsonAt for T
impl<T> JsonAt for T
Source§fn json_at<F>(
self,
location: impl Into<Vec<JsonBacktraceFrame<F>>>,
) -> JsonLocated<T, F>
fn json_at<F>( self, location: impl Into<Vec<JsonBacktraceFrame<F>>>, ) -> JsonLocated<T, F>
Pairs
self with location.