#[non_exhaustive]pub enum JsonError {
PduTooLarge,
InvalidType {
path: String,
expected: CanonicalJsonType,
found: CanonicalJsonType,
},
MissingField {
path: String,
},
Serde(Error),
}Expand description
All errors related to JSON validation/parsing.
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.
PduTooLarge
The PDU is too large.
InvalidType
The field at path was expected to be of type expected, but was received as found.
Fields
§
expected: CanonicalJsonTypeThe type that was expected.
§
found: CanonicalJsonTypeThe type that was found.
MissingField
A required field is missing from a JSON object.
Serde(Error)
A more generic JSON error from serde_json.
Trait Implementations§
Source§impl Error for JsonError
impl Error for JsonError
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()
Source§impl From<JsonError> for VerificationError
impl From<JsonError> for VerificationError
Source§impl From<RedactionError> for JsonError
impl From<RedactionError> for JsonError
Source§fn from(err: RedactionError) -> Self
fn from(err: RedactionError) -> Self
Converts to this type from the input type.
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