pub struct ClientConfig {
pub url: String,
pub api_token: String,
pub http_req_timeout_millis: u64,
pub max_num_retries: usize,
pub retry_backoff_ms: u64,
pub retry_base_ms: u64,
pub retry_ceiling_ms: u64,
pub serialization_format: SerializationFormat,
pub proactive_rate_limit_sleep: bool,
}Expand description
Configuration for the hypersync client.
Fields§
§url: StringHyperSync server URL.
api_token: StringHyperSync server api token.
http_req_timeout_millis: u64Milliseconds to wait for a response before timing out.
max_num_retries: usizeNumber of retries to attempt before returning error.
retry_backoff_ms: u64Milliseconds that would be used for retry backoff increasing.
retry_base_ms: u64Initial wait time for request backoff.
retry_ceiling_ms: u64Ceiling time for request backoff.
serialization_format: SerializationFormatQuery serialization format to use for HTTP requests.
proactive_rate_limit_sleep: boolWhether to proactively sleep when the rate limit is exhausted instead of sending requests that will be rejected with 429.
Enabled by default. Set to false to opt out and handle rate limits yourself.
Implementations§
Source§impl ClientConfig
impl ClientConfig
Sourcepub const fn default_http_req_timeout_millis() -> u64
pub const fn default_http_req_timeout_millis() -> u64
Default HTTP request timeout in milliseconds
Sourcepub const fn default_max_num_retries() -> usize
pub const fn default_max_num_retries() -> usize
Default maximum number of retries
Sourcepub const fn default_retry_backoff_ms() -> u64
pub const fn default_retry_backoff_ms() -> u64
Default retry backoff in milliseconds
Sourcepub const fn default_retry_base_ms() -> u64
pub const fn default_retry_base_ms() -> u64
Default retry base time in milliseconds
Sourcepub const fn default_retry_ceiling_ms() -> u64
pub const fn default_retry_ceiling_ms() -> u64
Default retry ceiling time in milliseconds
Sourcepub const fn default_proactive_rate_limit_sleep() -> bool
pub const fn default_proactive_rate_limit_sleep() -> bool
Default proactive rate limit sleep setting
Trait Implementations§
Source§impl Clone for ClientConfig
impl Clone for ClientConfig
Source§fn clone(&self) -> ClientConfig
fn clone(&self) -> ClientConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ClientConfig
impl Debug for ClientConfig
Source§impl Default for ClientConfig
impl Default for ClientConfig
Source§impl<'de> Deserialize<'de> for ClientConfig
impl<'de> Deserialize<'de> for ClientConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for ClientConfig
impl RefUnwindSafe for ClientConfig
impl Send for ClientConfig
impl Sync for ClientConfig
impl Unpin for ClientConfig
impl UnsafeUnpin for ClientConfig
impl UnwindSafe for ClientConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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>
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>
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