pub struct ClientConfig {
pub user_agent: String,
pub connect_timeout: Option<Duration>,
pub request_timeout: Duration,
pub response_timeout: Option<Duration>,
pub recv_body_timeout: Option<Duration>,
pub stream_timeout: Option<Duration>,
pub max_redirects: u32,
pub max_redirects_will_error: bool,
pub max_response_bytes: usize,
pub retry: RetryPolicy,
pub on_retry: Option<Arc<dyn Fn(&RetryEvent) + Send + Sync>>,
}Fields§
§user_agent: String§connect_timeout: Option<Duration>Connection-phase deadline; None disables this per-phase deadline.
request_timeout: DurationWhole-request deadline for buffered calls (headers + body).
response_timeout: Option<Duration>Time to receive response headers; for streams this is the first-byte
(first-token) deadline. None disables this per-phase deadline.
recv_body_timeout: Option<Duration>Total time to receive the body, starting after response headers arrive.
The budget is not restarted per read. None disables this phase deadline.
stream_timeout: Option<Duration>Optional total lifetime cap for a stream body.
max_redirects: u32Redirects followed (0 = never; credentials are never replayed to a new host).
max_redirects_will_error: boolError when a nonzero redirect limit is exceeded (default true, like ureq).
False returns the final 3xx response. With max_redirects = 0, redirects
are never followed and the 3xx response is always returned.
max_response_bytes: usize§retry: RetryPolicy§on_retry: Option<Arc<dyn Fn(&RetryEvent) + Send + Sync>>Trait Implementations§
Source§impl Clone for ClientConfig
impl Clone for ClientConfig
Auto Trait Implementations§
impl !RefUnwindSafe for ClientConfig
impl !UnwindSafe for ClientConfig
impl Freeze for ClientConfig
impl Send for ClientConfig
impl Sync for ClientConfig
impl Unpin for ClientConfig
impl UnsafeUnpin 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
Mutably borrows from an owned value. Read more