pub enum Error {
Show 14 variants
BitReq(Error),
SerdeJson(Error),
HttpResponse {
status: u16,
message: String,
},
Parsing(ParseIntError),
StatusCode(TryFromIntError),
BitcoinEncoding(Error),
HexToArray(HexToArrayError),
HexToBytes(HexToBytesError),
TransactionNotFound(Txid),
HeaderHeightNotFound(u32),
HeaderHashNotFound(BlockHash),
InvalidHttpHeaderName(String),
InvalidHttpHeaderValue(String),
InvalidResponse,
}Expand description
Errors that can occur while building clients, sending requests, or decoding responses.
Variants§
BitReq(Error)
Error during a bitreq HTTP request.
SerdeJson(Error)
Error during JSON serialization or deserialization.
HttpResponse
Non-successful HTTP response from the Esplora server.
Fields
Parsing(ParseIntError)
Invalid integer returned by the server.
StatusCode(TryFromIntError)
Invalid status code, unable to convert to u16.
BitcoinEncoding(Error)
Invalid Bitcoin consensus data returned by the server.
HexToArray(HexToArrayError)
Invalid fixed-size hex data returned by the server.
HexToBytes(HexToBytesError)
Invalid variable-length hex data returned by the server.
TransactionNotFound(Txid)
Transaction not found.
HeaderHeightNotFound(u32)
Block header height not found.
HeaderHashNotFound(BlockHash)
Block header hash not found.
InvalidHttpHeaderName(String)
Invalid HTTP header name specified in Builder::header.
InvalidHttpHeaderValue(String)
Invalid HTTP header value specified in Builder::header.
InvalidResponse
The server sent an invalid response.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
1.30.0 · 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<HexToArrayError> for Error
impl From<HexToArrayError> for Error
Source§fn from(err: HexToArrayError) -> Self
fn from(err: HexToArrayError) -> Self
Converts to this type from the input type.
Source§impl From<HexToBytesError> for Error
impl From<HexToBytesError> for Error
Source§fn from(err: HexToBytesError) -> Self
fn from(err: HexToBytesError) -> Self
Converts to this type from the input type.
Source§impl From<ParseIntError> for Error
impl From<ParseIntError> for Error
Source§fn from(err: ParseIntError) -> Self
fn from(err: ParseIntError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error
impl Freeze for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
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