Skip to content
Snippets Groups Projects
Commit 23cf2eaa authored by Maaz Ahmed's avatar Maaz Ahmed
Browse files

fix: implement essential traits on error types

parent 1a5e94dd
No related branches found
Tags v0.1.0
No related merge requests found
...@@ -155,7 +155,7 @@ impl SchemaInspector { ...@@ -155,7 +155,7 @@ impl SchemaInspector {
/// fails to conform to the schema the inspector was compiled with. /// fails to conform to the schema the inspector was compiled with.
/// ///
/// The error type internally holds a string containing detailed information about what part of the JSON differs from the schema /// The error type internally holds a string containing detailed information about what part of the JSON differs from the schema
#[derive(Debug)] #[derive(Debug, Clone, PartialEq, Eq)]
pub struct SchemaError { pub struct SchemaError {
cause: String, cause: String,
} }
...@@ -169,7 +169,7 @@ impl Display for SchemaError { ...@@ -169,7 +169,7 @@ impl Display for SchemaError {
} }
/// All the possible errors that can occur while initializing [`SchemaInspector`] /// All the possible errors that can occur while initializing [`SchemaInspector`]
#[derive(Debug)] #[derive(Debug, Clone, PartialEq, Eq)]
pub enum InitError { pub enum InitError {
SchemaNotFound(String), SchemaNotFound(String),
ResolutionFailure(String), // contains the reference that was not resolved ResolutionFailure(String), // contains the reference that was not resolved
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment