global: snapshot

This commit is contained in:
nym21
2025-08-03 23:38:58 +02:00
parent f7aa9424db
commit a2f5704581
50 changed files with 818 additions and 704 deletions

View File

@@ -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,