pub struct JsonError { /* private fields */ }Expand description
The error type for JSON decoding failure with context.
See DecodeError for the contextless errors used during decoding.
Implementations§
Source§impl JsonError
impl JsonError
pub fn index(&self) -> usize
pub fn decoding_error(&self) -> &'static DecodeError
pub fn new(error: &'static DecodeError, context: Option<String>) -> JsonError
pub fn extract( error: &'static DecodeError, parser: &mut Parser<'_>, ) -> JsonError
Trait Implementations§
Source§impl Error for JsonError
impl Error for JsonError
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 Freeze for JsonError
impl RefUnwindSafe for JsonError
impl Send for JsonError
impl Sync for JsonError
impl Unpin for JsonError
impl UnsafeUnpin for JsonError
impl UnwindSafe for JsonError
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