pub enum JsonSerDeError {
ContentDeserialization(Error),
JsonSerialization(Error),
}Expand description
Type representing an error in handling JSON De-/serialization
Variants§
ContentDeserialization(Error)
Content could not be deserialized from JSON.
JsonSerialization(Error)
JSON serialization failed.
Implementations§
Source§impl JsonSerDeError
impl JsonSerDeError
Sourcepub fn custom_deserialization(msg: &str) -> Self
pub fn custom_deserialization(msg: &str) -> Self
Shorthand to create Self::ContentDeserialization with a &str
message, using serde_json::Error::custom(msg).
Trait Implementations§
Source§impl Debug for JsonSerDeError
impl Debug for JsonSerDeError
Source§impl Display for JsonSerDeError
impl Display for JsonSerDeError
Source§impl Error for JsonSerDeError
impl Error for JsonSerDeError
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()
Source§impl From<JsonSerDeError> for ValidationError
impl From<JsonSerDeError> for ValidationError
Source§fn from(source: JsonSerDeError) -> Self
fn from(source: JsonSerDeError) -> Self
Converts to this type from the input type.
Source§impl From<JsonSerDeError> for EventConversionError
impl From<JsonSerDeError> for EventConversionError
Source§fn from(source: JsonSerDeError) -> Self
fn from(source: JsonSerDeError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for JsonSerDeError
impl !UnwindSafe for JsonSerDeError
impl Freeze for JsonSerDeError
impl Send for JsonSerDeError
impl Sync for JsonSerDeError
impl Unpin for JsonSerDeError
impl UnsafeUnpin for JsonSerDeError
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