pub struct Builder {
pub base_url: String,
pub proxy: Option<String>,
pub timeout: Option<u64>,
pub headers: HashMap<String, String>,
pub max_retries: usize,
}Fields§
§base_url: StringThe URL of the Esplora server.
proxy: Option<String>Optional URL of the proxy to use to make requests to the Esplora server
The string should be formatted as:
<protocol>://<user>:<password>@host:<port>.
Note that the format of this value and the supported protocols change
slightly between the blocking version of the client (using minreq)
and the async version (using reqwest). For more details check with
the documentation of the two crates. Both of them are compiled with
the socks feature enabled.
The proxy is ignored when targeting wasm32.
timeout: Option<u64>Socket timeout.
headers: HashMap<String, String>HTTP headers to set on every request made to Esplora server.
max_retries: usizeMax retries
Implementations§
Source§impl Builder
impl Builder
Sourcepub fn max_retries(self, count: usize) -> Builder
pub fn max_retries(self, count: usize) -> Builder
Set the maximum number of times to retry a request if the response status
is one of RETRYABLE_ERROR_CODES.
Sourcepub fn build_blocking(self) -> BlockingClient
pub fn build_blocking(self) -> BlockingClient
Build a blocking client from builder
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Builder
impl RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl UnwindSafe for Builder
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