pub enum JsonParseError<E: Error> {
Io(E),
Utf8(Utf8Error),
Parse(&'static str, Location),
BufferOverflow(Location),
}Expand description
A JsonParseError represents the range of things that can go wrong while reading a JSON
stream: I/O error, byte sequences that are invalid UTF-8, violations of JSON tokenization
or grammar, and tokens that exceed the JsonReader’s configured token buffer size.
Note that the representation of I/O errors depends on the reader implementation and is therefore a generic parameter of JsonParseError.
Variants§
Trait Implementations§
Source§impl<E: Error> Display for JsonParseError<E>
impl<E: Error> Display for JsonParseError<E>
Source§impl<E: Error> Error for JsonParseError<E>
impl<E: Error> Error for JsonParseError<E>
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()
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> 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