4 /// An error that possibly needs to be handled by the user.
6 /// A transaction sync failed and needs to be retried eventually.
10 impl std::error::Error for TxSyncError {}
12 impl fmt::Display for TxSyncError {
13 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
15 Self::Failed => write!(f, "Failed to conduct transaction sync."),
21 #[cfg(any(feature = "esplora-blocking", feature = "esplora-async"))]
22 pub(crate) enum InternalError {
23 /// A transaction sync failed and needs to be retried eventually.
25 /// An inconsistency was encountered during transaction sync.
29 #[cfg(any(feature = "esplora-blocking", feature = "esplora-async"))]
30 impl fmt::Display for InternalError {
31 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
33 Self::Failed => write!(f, "Failed to conduct transaction sync."),
34 Self::Inconsistency => {
35 write!(f, "Encountered an inconsistency during transaction sync.")
41 #[cfg(any(feature = "esplora-blocking", feature = "esplora-async"))]
42 impl std::error::Error for InternalError {}
44 #[cfg(any(feature = "esplora-blocking", feature = "esplora-async"))]
45 impl From<esplora_client::Error> for TxSyncError {
46 fn from(_e: esplora_client::Error) -> Self {
51 #[cfg(any(feature = "esplora-blocking", feature = "esplora-async"))]
52 impl From<esplora_client::Error> for InternalError {
53 fn from(_e: esplora_client::Error) -> Self {
58 #[cfg(any(feature = "esplora-blocking", feature = "esplora-async"))]
59 impl From<InternalError> for TxSyncError {
60 fn from(_e: InternalError) -> Self {