pub struct FetchHttpTimeouts { /* private fields */ }Expand description
Bounded timeout and low-speed policy for one complete fetch.
Implementations§
Source§impl FetchHttpTimeouts
impl FetchHttpTimeouts
Sourcepub fn new(
dns: Duration,
connect: Duration,
first_byte: Duration,
total: Duration,
low_speed_window: Duration,
low_speed_min_bytes: usize,
) -> Result<Self, FetchProviderError>
pub fn new( dns: Duration, connect: Duration, first_byte: Duration, total: Duration, low_speed_window: Duration, low_speed_min_bytes: usize, ) -> Result<Self, FetchProviderError>
Creates a complete timeout policy.
§Errors
Rejects zero durations, durations above two minutes, a total timeout shorter than a phase timeout, and a zero low-speed byte threshold.
Sourcepub const fn first_byte(self) -> Duration
pub const fn first_byte(self) -> Duration
Returns the response-header/first-byte timeout.
Sourcepub const fn total(self) -> Duration
pub const fn total(self) -> Duration
Returns the complete request timeout across DNS and redirects.
Sourcepub const fn low_speed_window(self) -> Duration
pub const fn low_speed_window(self) -> Duration
Returns the low-speed measurement window.
Sourcepub const fn low_speed_min_bytes(self) -> usize
pub const fn low_speed_min_bytes(self) -> usize
Returns the minimum bytes expected per low-speed window.
Trait Implementations§
Source§impl Clone for FetchHttpTimeouts
impl Clone for FetchHttpTimeouts
impl Copy for FetchHttpTimeouts
Source§impl Debug for FetchHttpTimeouts
impl Debug for FetchHttpTimeouts
Source§impl Default for FetchHttpTimeouts
impl Default for FetchHttpTimeouts
impl Eq for FetchHttpTimeouts
Source§impl Ord for FetchHttpTimeouts
impl Ord for FetchHttpTimeouts
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for FetchHttpTimeouts
impl PartialEq for FetchHttpTimeouts
Source§impl PartialOrd for FetchHttpTimeouts
impl PartialOrd for FetchHttpTimeouts
impl StructuralPartialEq for FetchHttpTimeouts
Auto Trait Implementations§
impl Freeze for FetchHttpTimeouts
impl RefUnwindSafe for FetchHttpTimeouts
impl Send for FetchHttpTimeouts
impl Sync for FetchHttpTimeouts
impl Unpin for FetchHttpTimeouts
impl UnsafeUnpin for FetchHttpTimeouts
impl UnwindSafe for FetchHttpTimeouts
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.