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 REST client.
§Credit Allowance
credit_budget is shared by all 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.
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 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§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more