pub struct ClientBuilder { /* private fields */ }Expand description
Builder for Client.
Implementations§
Source§impl ClientBuilder
impl ClientBuilder
Sourcepub fn response_limit(self, bytes: usize) -> Self
pub fn response_limit(self, bytes: usize) -> Self
Sets the maximum decoded HTTP response size.
Sourcepub fn proxy(self, proxy: impl Into<String>) -> Self
pub fn proxy(self, proxy: impl Into<String>) -> Self
Routes HTTP requests through the supplied proxy URL.
Ambient process proxy variables are deliberately ignored. This method is the only way to enable proxying for REST and real-time traffic.
Sourcepub fn max_retries(self, max_retries: u32) -> Self
pub fn max_retries(self, max_retries: u32) -> Self
Sets the number of retries for read/query requests.
Money-moving mutations are never retried.
Sourcepub fn retry_delays(self, initial: Duration, maximum: Duration) -> Self
pub fn retry_delays(self, initial: Duration, maximum: Duration) -> Self
Sets the initial and maximum exponential retry delays.
Sourcepub fn rate_limits(self, rate_limits: RateLimitConfig) -> Self
pub fn rate_limits(self, rate_limits: RateLimitConfig) -> Self
Replaces the default ProjectX REST rate limits.
The configured budgets are shared by the built Client and all of
its clones.
Sourcepub fn disable_rate_limits(self) -> Self
pub fn disable_rate_limits(self) -> Self
Disables local REST rate limiting.
Use this only when an external coordinator enforces the provider limits across every client and process using the same credentials. Provider HTTP 429 responses still participate in query retry delays.