pub enum BitcoinError {
RpcError(String),
TransactionNotFound(String),
UTXOSpent(String),
InvalidMerkleProof(String),
RegistryFull(String),
ReorgDetected {
height: u64,
depth: u64,
},
InsufficientConfirmations {
got: u64,
need: u64,
},
CoreError(AdapterError),
}Expand description
Bitcoin adapter specific errors
Variants§
RpcError(String)
Bitcoin RPC error
TransactionNotFound(String)
Transaction not found
UTXOSpent(String)
UTXO already spent
InvalidMerkleProof(String)
Invalid Merkle proof
RegistryFull(String)
Registry full (max size reached)
ReorgDetected
Reorg detected
InsufficientConfirmations
Insufficient confirmations
CoreError(AdapterError)
Wrapper for core adapter errors
Implementations§
Source§impl BitcoinError
impl BitcoinError
Sourcepub fn is_transient(&self) -> bool
pub fn is_transient(&self) -> bool
Whether this error is transient and may be retried
Trait Implementations§
Source§impl Debug for BitcoinError
impl Debug for BitcoinError
Source§impl Display for BitcoinError
impl Display for BitcoinError
Source§impl Error for BitcoinError
impl Error for BitcoinError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<AdapterError> for BitcoinError
impl From<AdapterError> for BitcoinError
Source§fn from(source: AdapterError) -> Self
fn from(source: AdapterError) -> Self
Converts to this type from the input type.
Source§impl From<BitcoinError> for AdapterError
impl From<BitcoinError> for AdapterError
Source§fn from(err: BitcoinError) -> Self
fn from(err: BitcoinError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for BitcoinError
impl RefUnwindSafe for BitcoinError
impl Send for BitcoinError
impl Sync for BitcoinError
impl Unpin for BitcoinError
impl UnsafeUnpin for BitcoinError
impl UnwindSafe for BitcoinError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.