use thiserror::Error;
#[derive(Error, Debug)]
pub enum Error {
#[error("The type {0:?} is not a known Microformats class supported by this library.")]
NotKnownClass(String),
#[error("JSON: {0}")]
JSON(#[from] serde_json::Error),
#[error("The provided JSON value was not an object.")]
NotAnObject,
#[error("Missing property {0:?} when converting from JSON.")]
JsonObjectMissingProperty(String),
#[error(transparent)]
Temporal(#[from] crate::temporal::Error),
}
impl PartialEq for Error {
fn eq(&self, other: &Self) -> bool {
self.to_string().eq(&other.to_string())
}
}
impl Eq for Error {}