pub struct ClientBuilder { /* private fields */ }Available on crate feature
_async only.Expand description
Builder for async Client.
Implementations§
Source§impl ClientBuilder
impl ClientBuilder
Sourcepub fn profile(self, value: ClientProfile) -> Self
pub fn profile(self, value: ClientProfile) -> Self
Applies a reqx transport profile and clears profile-controlled overrides.
Sourcepub fn client_name(self, value: impl Into<String>) -> Self
pub fn client_name(self, value: impl Into<String>) -> Self
Sets client name (user-agent like identifier).
Sourcepub fn request_timeout(self, value: Duration) -> Self
pub fn request_timeout(self, value: Duration) -> Self
Sets per-request timeout.
Sourcepub fn total_timeout(self, value: Duration) -> Self
pub fn total_timeout(self, value: Duration) -> Self
Sets total request deadline.
Sourcepub fn connect_timeout(self, value: Duration) -> Self
pub fn connect_timeout(self, value: Duration) -> Self
Sets TCP connect timeout.
Sourcepub fn no_system_proxy(self, enabled: bool) -> Self
pub fn no_system_proxy(self, enabled: bool) -> Self
Enables or disables system proxy usage.
Sourcepub fn webhook_base_url(self, value: impl Into<String>) -> Self
pub fn webhook_base_url(self, value: impl Into<String>) -> Self
Overrides webhook API base URL.
Sourcepub fn enterprise_base_url(self, value: impl Into<String>) -> Self
pub fn enterprise_base_url(self, value: impl Into<String>) -> Self
Overrides enterprise API base URL.
Sourcepub fn retry_policy(self, value: RetryPolicy) -> Self
pub fn retry_policy(self, value: RetryPolicy) -> Self
Overrides the reqx retry policy selected by the current profile.
Sourcepub fn retry_non_idempotent(self, enabled: bool) -> Self
pub fn retry_non_idempotent(self, enabled: bool) -> Self
Enables retry for non-idempotent requests.
Sourcepub fn default_header(
self,
name: impl Into<String>,
value: impl Into<String>,
) -> Self
pub fn default_header( self, name: impl Into<String>, value: impl Into<String>, ) -> Self
Adds a default header to all requests.
Sourcepub fn cache_access_token(self, enabled: bool) -> Self
pub fn cache_access_token(self, enabled: bool) -> Self
Enables or disables enterprise access-token cache.
Sourcepub fn token_refresh_margin(self, value: Duration) -> Self
pub fn token_refresh_margin(self, value: Duration) -> Self
Sets refresh margin for cached access-token expiration.
Sourcepub fn body_snippet(self, value: BodySnippetConfig) -> Self
pub fn body_snippet(self, value: BodySnippetConfig) -> Self
Configures body snippet capture for API errors.
Trait Implementations§
Source§impl Clone for ClientBuilder
impl Clone for ClientBuilder
Source§fn clone(&self) -> ClientBuilder
fn clone(&self) -> ClientBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ClientBuilder
impl Debug for ClientBuilder
Source§impl Default for ClientBuilder
impl Default for ClientBuilder
Source§fn default() -> ClientBuilder
fn default() -> ClientBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ClientBuilder
impl !RefUnwindSafe for ClientBuilder
impl Send for ClientBuilder
impl Sync for ClientBuilder
impl Unpin for ClientBuilder
impl UnsafeUnpin for ClientBuilder
impl !UnwindSafe for ClientBuilder
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