pub enum CallTimeout {
None,
PerAttempt(Duration),
Call(Instant),
}Expand description
The timeout model of one call.
Variants§
None
No timeout (cancellation is by drop only).
PerAttempt(Duration)
Each attempt gets its own deadline, d after it
starts, covering the header fetch, the send and the read of a body that ends the call;
a timed-out attempt is retried like a connection error unless it is the last, which
fails with RestError::DeadlineExceeded; a streaming body stays under the last
attempt’s deadline. PerAttempt(Duration::ZERO) is CallTimeout::None.
Call(Instant)
One deadline around the whole call: over every
attempt, every backoff sleep and the streaming body. Reaching it ends the call at once
with RestError::DeadlineExceeded, never retried; a deadline already passed sends
nothing. The caller computes it when the call (or stream) starts running.
Trait Implementations§
Source§impl Clone for CallTimeout
impl Clone for CallTimeout
impl Copy for CallTimeout
Source§impl Debug for CallTimeout
impl Debug for CallTimeout
Source§impl Default for CallTimeout
impl Default for CallTimeout
impl Eq for CallTimeout
Source§impl PartialEq for CallTimeout
impl PartialEq for CallTimeout
impl StructuralPartialEq for CallTimeout
Auto Trait Implementations§
impl Forget for CallTimeout
impl Freeze for CallTimeout
impl Move for CallTimeout
impl RefUnwindSafe for CallTimeout
impl Send for CallTimeout
impl Sync for CallTimeout
impl Unpin for CallTimeout
impl UnsafeUnpin for CallTimeout
impl UnwindSafe for CallTimeout
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§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.