logo
pub struct EsploraBlockchainConfig {
    pub base_url: String,
    pub proxy: Option<String>,
    pub concurrency: Option<u8>,
    pub stop_gap: usize,
    pub timeout: Option<u64>,
}
This is supported on crate feature esplora only.
Expand description

Configuration for an EsploraBlockchain

Fields

base_url: String

Base URL of the esplora service

eg. https://blockstream.info/api/

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 sync version of esplora (using ureq) 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.

concurrency: Option<u8>

Number of parallel requests sent to the esplora service (default: 4)

stop_gap: usize

Stop searching addresses for transactions after finding an unused gap of this length.

timeout: Option<u64>

Socket timeout.

Implementations

create a config with default values given the base url and stop gap

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

Performs the conversion.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.