pub enum Error {
DecodeHex(FromHexError),
GetBlockVerboseOne(GetBlockVerboseOneError),
GetBlockHeaderVerbose(GetBlockHeaderVerboseError),
GetBlockFilter(GetBlockFilterError),
InvalidCookieFile,
InvalidUrl(String),
JsonRpc(Error),
HexToArray(HexToArrayError),
Json(Error),
Io(Error),
TryFromInt(TryFromIntError),
}Expand description
Errors that can occur when using the Bitcoin RPC client.
Variants§
DecodeHex(FromHexError)
Hex deserialization error
GetBlockVerboseOne(GetBlockVerboseOneError)
Error converting GetBlockVersboseOne type into the model type
GetBlockHeaderVerbose(GetBlockHeaderVerboseError)
Error modeling GetBlockHeaderVerbose.
GetBlockFilter(GetBlockFilterError)
Error modeling GetBlockFilter
InvalidCookieFile
Invalid or corrupted cookie file.
InvalidUrl(String)
The provided URL is syntactically incorrect
JsonRpc(Error)
JSON-RPC error from the server.
HexToArray(HexToArrayError)
Hash parsing error.
Json(Error)
JSON serialization/deserialization error.
Io(Error)
I/O error (e.g., reading cookie file, network issues).
TryFromInt(TryFromIntError)
Error when converting an integer type to a smaller type due to overflow.
Implementations§
Source§impl Error
Extension methods for the client error type.
impl Error
Extension methods for the client error type.
Sourcepub fn is_not_found_error(&self) -> bool
pub fn is_not_found_error(&self) -> bool
Returns true if this is a “not found” error returned by bitcoind.
bitcoind returns error code -5 (RPC_INVALID_ADDRESS_OR_KEY)
whenever a requested block hash, transaction ID, address, or similar object
does not exist on the node.
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)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()