pub enum ClientError {
Show 18 variants
MissingUserPassword,
Server(i32, String),
Parse(String),
Param(String),
Body(String),
Status(String, String),
MalformedResponse(String),
Connection(String),
Timeout,
HttpRedirect(String),
ReqBuilder(String),
MaxRetriesExceeded(u8),
Request(String),
WrongNetworkAddress(Network),
UnexpectedServerVersion(UnexpectedServerVersionError),
Sign(SignRawTransactionWithWalletError),
Xpriv,
Other(String),
}
Expand description
The error type for errors produced in this library.
Variants§
MissingUserPassword
Missing username or password for the RPC server
Server(i32, String)
RPC server returned an error
§Note
These errors are ABSOLUTELY UNDOCUMENTED. Check https://github.com/bitcoin/bitcoin/blob/96b0a8f858ab24f3672360b8c830553b963de726/src/rpc/protocol.h#L24 and good luck!
Parse(String)
Param(String)
Error creating the RPC request, retry might help
Body(String)
Body error, unlikely to be recoverable by retrying
Status(String, String)
HTTP status error, not retryable
MalformedResponse(String)
Error decoding the response, retry might not help
Connection(String)
Connection error, retry might help
Timeout
Timeout error, retry might help
HttpRedirect(String)
Redirect error, not retryable
ReqBuilder(String)
Error building the request, unlikely to be recoverable
MaxRetriesExceeded(u8)
Maximum retries exceeded, not retryable
Request(String)
General request error, retry might help
WrongNetworkAddress(Network)
Wrong network address
UnexpectedServerVersion(UnexpectedServerVersionError)
Server version is unexpected or incompatible
Sign(SignRawTransactionWithWalletError)
Could not sign raw transaction
Xpriv
Could not get a Xpriv
from the wallet
Other(String)
Unknown error, unlikely to be recoverable
Implementations§
Source§impl ClientError
impl ClientError
pub fn is_tx_not_found(&self) -> bool
pub fn is_block_not_found(&self) -> bool
pub fn is_missing_or_invalid_input(&self) -> bool
Trait Implementations§
Source§impl Clone for ClientError
impl Clone for ClientError
Source§fn clone(&self) -> ClientError
fn clone(&self) -> ClientError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for ClientError
impl Debug for ClientError
Source§impl<'de> Deserialize<'de> for ClientError
impl<'de> Deserialize<'de> for ClientError
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Display for ClientError
impl Display for ClientError
Source§impl Error for ClientError
impl Error for ClientError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl From<BitcoinRpcError> for ClientError
impl From<BitcoinRpcError> for ClientError
Source§fn from(value: BitcoinRpcError) -> Self
fn from(value: BitcoinRpcError) -> Self
Source§impl From<Error> for ClientError
impl From<Error> for ClientError
Source§fn from(value: SerdeJsonError) -> Self
fn from(value: SerdeJsonError) -> Self
Source§impl From<SignRawTransactionWithWalletError> for ClientError
impl From<SignRawTransactionWithWalletError> for ClientError
Source§fn from(source: SignRawTransactionWithWalletError) -> Self
fn from(source: SignRawTransactionWithWalletError) -> Self
Source§impl From<UnexpectedServerVersionError> for ClientError
impl From<UnexpectedServerVersionError> for ClientError
Source§fn from(source: UnexpectedServerVersionError) -> Self
fn from(source: UnexpectedServerVersionError) -> Self
Source§impl PartialEq for ClientError
impl PartialEq for ClientError
Source§impl Serialize for ClientError
impl Serialize for ClientError
impl StructuralPartialEq for ClientError
Auto Trait Implementations§
impl Freeze for ClientError
impl RefUnwindSafe for ClientError
impl Send for ClientError
impl Sync for ClientError
impl Unpin for ClientError
impl UnwindSafe for ClientError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.