mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-04-24 22:59:58 -07:00
global: snapshot
This commit is contained in:
@@ -13,12 +13,14 @@ pub enum Error {
|
||||
Fjall(fjall::Error),
|
||||
Minreq(minreq::Error),
|
||||
SystemTimeError(time::SystemTimeError),
|
||||
SerdeJson(serde_json::Error),
|
||||
ZeroCopyError,
|
||||
Vecs(brk_vecs::Error),
|
||||
|
||||
WrongLength,
|
||||
WrongAddressType,
|
||||
UnindexableDate,
|
||||
QuickCacheError,
|
||||
Str(&'static str),
|
||||
String(String),
|
||||
}
|
||||
@@ -29,6 +31,12 @@ impl From<time::SystemTimeError> for Error {
|
||||
}
|
||||
}
|
||||
|
||||
impl From<serde_json::Error> for Error {
|
||||
fn from(error: serde_json::Error) -> Self {
|
||||
Self::SerdeJson(error)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<io::Error> for Error {
|
||||
fn from(value: io::Error) -> Self {
|
||||
Self::IO(value)
|
||||
@@ -82,6 +90,7 @@ impl fmt::Display for Error {
|
||||
match self {
|
||||
Error::IO(error) => Debug::fmt(&error, f),
|
||||
Error::Minreq(error) => Debug::fmt(&error, f),
|
||||
Error::SerdeJson(error) => Debug::fmt(&error, f),
|
||||
Error::Vecs(error) => Debug::fmt(&error, f),
|
||||
Error::BitcoinRPC(error) => Debug::fmt(&error, f),
|
||||
Error::SystemTimeError(error) => Debug::fmt(&error, f),
|
||||
@@ -90,6 +99,7 @@ impl fmt::Display for Error {
|
||||
Error::ZeroCopyError => write!(f, "ZeroCopy error"),
|
||||
|
||||
Error::WrongLength => write!(f, "Wrong length"),
|
||||
Error::QuickCacheError => write!(f, "Quick cache error"),
|
||||
Error::WrongAddressType => write!(f, "Wrong address type"),
|
||||
Error::UnindexableDate => write!(
|
||||
f,
|
||||
|
||||
Reference in New Issue
Block a user