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 realtime_event_capacity(self, capacity: usize) -> Self
pub fn realtime_event_capacity(self, capacity: usize) -> Self
Sets queued real-time events per hub (default 65,536).
This is a stalled-consumer signal, not a subscription quota. Saturation retains a nonterminal gap; the socket and invocation completions continue. Increase it for larger bursts or a slower consumer. Build rejects zero or values outside Tokio’s representable permit range; there is no SDK ceiling.
Sourcepub fn realtime_writer_capacity(self, capacity: usize) -> Self
pub fn realtime_writer_capacity(self, capacity: usize) -> Self
Sets queued outbound real-time messages per hub (default 4,096).
A full queue refuses new admission with SendQueueFull without sending.
Build rejects zero or values outside Tokio’s representable permit range.
Sourcepub fn realtime_pending_invocation_capacity(self, capacity: usize) -> Self
pub fn realtime_pending_invocation_capacity(self, capacity: usize) -> Self
Sets simultaneous incomplete real-time invocations per hub (default 4,096).
Completed subscriptions consume no slots and have no total-count limit.
A full set refuses admission with PendingInvocationCapacity before sending.
Build rejects zero or values outside Tokio’s representable permit range.
Sourcepub fn realtime_invocation_timeout(self, timeout: Duration) -> Self
pub fn realtime_invocation_timeout(self, timeout: Duration) -> Self
Sets the real-time invocation completion wait after enqueue (default 15s). A deadline includes writer-queue time, preserves an unknown outcome and never closes the socket or resends the request. Build rejects zero or durations outside Tokio’s representable clock range.
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.