pub struct CoinApiHttpConfig {
pub base_url: String,
pub proxy_url: Option<SecretString>,
pub max_concurrent_requests: usize,
pub credit_budget: u64,
pub retry: RetryConfig,
}Expand description
Transport configuration for the raw HTTP client.
§Credit Allowance
credit_budget is shared by REST requests on this instance:
- Each attempt reserves ceil(requested limit / 100) credits, or one credit when the request has no record limit.
- A successful historical page keeps ceil(returned records / 100) credits, with a minimum of one, and refunds the rest of its reservation.
- Failed or canceled attempts keep their full reservation.
This is a local safety limit, not the provider’s billing ledger, and it does not coordinate with other clients. Flat Files downloads use separate provider billing and do not consume this REST allowance. Both services share the concurrency and retry controls.
Fields§
§base_url: StringBase URL including the version prefix; accepts local simulated peers.
proxy_url: Option<SecretString>Optional explicit proxy URL; ambient system proxies remain disabled.
max_concurrent_requests: usizeMaximum simultaneous requests for this client instance.
credit_budget: u64Lifetime credit allowance for this instance; see the struct docs for accounting.
retry: RetryConfigRetry policy; the elapsed budget and any configured attempt timeout must be positive.
Trait Implementations§
Source§impl Clone for CoinApiHttpConfig
impl Clone for CoinApiHttpConfig
Source§impl Debug for CoinApiHttpConfig
impl Debug for CoinApiHttpConfig
Auto Trait Implementations§
impl Forget for CoinApiHttpConfig
impl Freeze for CoinApiHttpConfig
impl RefUnwindSafe for CoinApiHttpConfig
impl Send for CoinApiHttpConfig
impl Sync for CoinApiHttpConfig
impl Unpin for CoinApiHttpConfig
impl UnsafeUnpin for CoinApiHttpConfig
impl UnwindSafe for CoinApiHttpConfig
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