pub struct JsonError { /* private fields */ }Expand description
Error produced while parsing, selecting, or rewriting JSON.
Implementations§
Source§impl JsonError
impl JsonError
Sourcepub const fn new(kind: JsonErrorKind) -> Self
pub const fn new(kind: JsonErrorKind) -> Self
Creates an error without a byte offset.
Sourcepub const fn at(kind: JsonErrorKind, offset: usize) -> Self
pub const fn at(kind: JsonErrorKind, offset: usize) -> Self
Creates an error at an absolute input byte offset.
Sourcepub const fn kind(&self) -> &JsonErrorKind
pub const fn kind(&self) -> &JsonErrorKind
The reason for the failure.
Trait Implementations§
impl Eq for JsonError
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()
impl StructuralPartialEq for JsonError
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