pub struct AdmittedRequest { /* private fields */ }Expand description
A request a RequestGate admitted, held by the source for as long as the request is in
flight: dropping it — on every exit, a cancelled or failed one included — tells the gate the
request is over through RequestGate::request_ended, exactly once.
Bind it (let admitted = …) and drop it once the response has been read, or the request
failed; never hold it across a wait before a retry or across another request’s ask, since a
gate admitting one request at a time would then wait on itself.
Implementations§
Trait Implementations§
Source§impl Debug for AdmittedRequest
impl Debug for AdmittedRequest
Source§impl Drop for AdmittedRequest
impl Drop for AdmittedRequest
Auto Trait Implementations§
impl !RefUnwindSafe for AdmittedRequest
impl !UnwindSafe for AdmittedRequest
impl Forget for AdmittedRequest
impl Freeze for AdmittedRequest
impl Move for AdmittedRequest
impl Send for AdmittedRequest
impl Sync for AdmittedRequest
impl Unpin for AdmittedRequest
impl UnsafeUnpin for AdmittedRequest
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