pub struct Timeouts {
pub global: Option<Duration>,
pub per_call: Option<Duration>,
pub resolve: Option<Duration>,
pub connect: Option<Duration>,
pub send_request: Option<Duration>,
pub await_100: Option<Duration>,
pub send_body: Option<Duration>,
pub recv_response: Option<Duration>,
pub recv_body: Option<Duration>,
/* private fields */
}Expand description
Request timeout configuration.
This can be configured both on Agent level as well as per request.
Fields§
§global: Option<Duration>Timeout for the entire call
This is end-to-end, from DNS lookup to finishing reading the response body. Thus it covers all other timeouts.
Defaults to None.
per_call: Option<Duration>Timeout for call-by-call when following redirects
This covers a single call and the timeout is reset when ureq follows a redirections.
Defaults to None.
resolve: Option<Duration>Max duration for doing the DNS lookup when establishing the connection
Because most platforms do not have an async syscall for looking up a host name, setting this might force str0m to spawn a thread to handle the timeout.
Defaults to None.
connect: Option<Duration>Max duration for establishing the connection
For a TLS connection this includes opening the socket and doing the TLS handshake.
Defaults to None.
send_request: Option<Duration>Max duration for sending the request, but not the request body.
Defaults to None.
await_100: Option<Duration>Max duration for awaiting a 100-continue response.
Only used if there is a request body and we sent the Expect: 100-continue
header to indicate we want the server to respond with 100.
This defaults to 1 second.
send_body: Option<Duration>Max duration for sending a request body (if there is one)
Defaults to None.
recv_response: Option<Duration>Max duration for receiving the response headers, but not the body
Defaults to None.
recv_body: Option<Duration>Max duration for receving the response body.
Defaults to None.
Trait Implementations§
impl Copy for Timeouts
Auto Trait Implementations§
impl Freeze for Timeouts
impl RefUnwindSafe for Timeouts
impl Send for Timeouts
impl Sync for Timeouts
impl Unpin for Timeouts
impl UnwindSafe for Timeouts
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)