pub struct RequestReadDeadline { /* private fields */ }Expand description
One absolute request deadline represented on async and blocking clocks.
Tokio’s instant is authoritative for async timeout selection, including paused-clock tests. The wall instant lets blocking backends enforce the same non-renewing deadline without depending on Tokio’s runtime clock.
Implementations§
Source§impl RequestReadDeadline
impl RequestReadDeadline
Sourcepub fn after(duration: Duration) -> RequestReadDeadline
pub fn after(duration: Duration) -> RequestReadDeadline
Create a deadline duration from now.
Sourcepub fn async_at(self) -> Instant
pub fn async_at(self) -> Instant
Tokio-clock instant used by request coordinators and timeout selection.
Sourcepub fn blocking_at(self) -> Instant
pub fn blocking_at(self) -> Instant
Wall-clock instant used by blocking backend cancellation checks.
Trait Implementations§
Source§impl Clone for RequestReadDeadline
impl Clone for RequestReadDeadline
Source§fn clone(&self) -> RequestReadDeadline
fn clone(&self) -> RequestReadDeadline
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for RequestReadDeadline
Auto Trait Implementations§
impl Freeze for RequestReadDeadline
impl RefUnwindSafe for RequestReadDeadline
impl Send for RequestReadDeadline
impl Sync for RequestReadDeadline
impl Unpin for RequestReadDeadline
impl UnsafeUnpin for RequestReadDeadline
impl UnwindSafe for RequestReadDeadline
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more