dusk_data_driver/
error.rs1use alloc::string::{String, ToString};
10use core::fmt;
11
12#[derive(Debug, Clone, PartialEq)]
14pub enum Error {
15 Rkyv(String),
17 Json(String),
19 Unsupported(String),
21 Other(String),
23}
24
25impl fmt::Display for Error {
26 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
27 write!(f, "Data-Driver Error: {:?}", &self)
28 }
29}
30
31impl From<serde_json::Error> for Error {
32 fn from(value: serde_json::Error) -> Self {
33 Self::Json(value.to_string())
34 }
35}