pub struct HttpTimeouts {
pub connect: Option<Duration>,
pub request: Option<Duration>,
pub download: Option<Duration>,
}Expand description
Resolved HTTP timeout defaults shared by every outbound client.
None means “no timeout of this kind” — reqwest then leaves the phase
unbounded, which is the documented meaning of a 0 in [timeouts]. Keeping
the distinction in the type (rather than a Duration::ZERO sentinel) means
call sites cannot accidentally install a zero deadline that fails instantly.
Fields§
§connect: Option<Duration>Timeout for the TCP/TLS connect phase.
request: Option<Duration>Timeout for the whole request, including the response body.
download: Option<Duration>Timeout for large artifact transfers.
Implementations§
Source§impl HttpTimeouts
impl HttpTimeouts
Sourcepub const fn from_seconds(connect: u64, request: u64, download: u64) -> Self
pub const fn from_seconds(connect: u64, request: u64, download: u64) -> Self
Resolve a configured number of [timeouts] seconds into an optional
duration, where 0 disables the phase.
Trait Implementations§
Source§impl Clone for HttpTimeouts
impl Clone for HttpTimeouts
impl Copy for HttpTimeouts
Source§impl Debug for HttpTimeouts
impl Debug for HttpTimeouts
Source§impl Default for HttpTimeouts
impl Default for HttpTimeouts
impl Eq for HttpTimeouts
Source§impl PartialEq for HttpTimeouts
impl PartialEq for HttpTimeouts
impl StructuralPartialEq for HttpTimeouts
Auto Trait Implementations§
impl Freeze for HttpTimeouts
impl RefUnwindSafe for HttpTimeouts
impl Send for HttpTimeouts
impl Sync for HttpTimeouts
impl Unpin for HttpTimeouts
impl UnsafeUnpin for HttpTimeouts
impl UnwindSafe for HttpTimeouts
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.