Crate rs_dapi_client

Crate rs_dapi_client 

Source
Expand description

This crate provides DapiClient — transport layer for a decentralized API for Dash.

Re-exports§

pub use dump::DumpData;

Modules§

dump
Dumping of requests and responses to disk
mock
Mock implementation of rs-dapi-client for testing
transport
Transport options that DAPI requests use under the hood.

Structs§

Address
DAPI address.
AddressList
A structure to manage DAPI addresses to select from for DapiRequest execution.
AddressStatus
Address status Contains information about the number of bans and the time until the next ban is lifted.
ConnectionPool
ConnectionPool represents pool of connections to DAPI nodes.
DapiClient
Access point to DAPI.
ExecutionError
Error happened during request execution.
ExecutionResponse
Request execution response.
RequestSettings
DAPI request settings.
Uri
The URI component of a request.

Enums§

AddressListError
AddressList errors
DapiClientError
General DAPI request error type.

Traits§

CanRetry
Returns true if the operation can be retried.
DapiRequest
A DAPI request could be executed with an initialized DapiClient.
DapiRequestExecutor
DAPI client executor trait.
InnerInto
Convert inner type without losing additional context information of the wrapper.
IntoInner
Unwrap wrapped types
WrapToExecutionResult
Convert Result<T,TE> to ExecutionResult<R,E>, taking context from ExecutionResponse.

Functions§

update_address_ban_status
Ban address in case of retryable error or unban it if it was banned, and the request was successful.

Type Aliases§

ExecutionResult
Result of request execution