pub struct PhaseClock(/* private fields */);Expand description
The phase an exchange is in, shared by the exchange and its watcher. Clones share state.
Implementations§
Source§impl PhaseClock
impl PhaseClock
Sourcepub fn start(policy: PhasePolicy, budget: Budget, first: TransportPhase) -> Self
pub fn start(policy: PhasePolicy, budget: Budget, first: TransportPhase) -> Self
A clock that starts now in first, under budget.
Sourcepub fn enter(&self, phase: TransportPhase)
pub fn enter(&self, phase: TransportPhase)
Start phase now, with the lesser of its ceiling and the budget left
as its allowance. Phases only move forward: entering the current or
an earlier phase changes nothing, so a chunk can never restart the
response body.
Sourcepub fn phase(&self) -> TransportPhase
pub fn phase(&self) -> TransportPhase
The phase now running.
Sourcepub fn body_taken(&self)
pub fn body_taken(&self)
The request body was handed to the connection.
Sourcepub fn flushed(&self)
pub fn flushed(&self)
A flush of the request stream completed: once the body was taken, the request is written and the wait for the first response byte begins.
Sourcepub fn response_byte(&self)
pub fn response_byte(&self)
A response byte arrived: the response body phase begins (once).
Trait Implementations§
Source§impl Clone for PhaseClock
impl Clone for PhaseClock
Auto Trait Implementations§
impl Freeze for PhaseClock
impl RefUnwindSafe for PhaseClock
impl Send for PhaseClock
impl Sync for PhaseClock
impl Unpin for PhaseClock
impl UnsafeUnpin for PhaseClock
impl UnwindSafe for PhaseClock
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