pub struct ResponseWaiter<K: Eq + Hash, R> { /* private fields */ }Expand description
A future that resolves with the response for a single request.
Resolves to:
Ok(response)whenPendingRequests::handle_responsedelivers a value,Err(Error::RequestTimeout)when the configured timeout elapses first,Err(Error::Canceled)when the request is canceled or the registry is dropped.
Trait Implementations§
impl<K: Eq + Hash, R> Unpin for ResponseWaiter<K, R>
The Sleep is the only !Unpin field and it is kept behind a
Pin<Box<_>>; nothing in this struct is self-referential, so it is safe
to treat the waiter itself as Unpin regardless of K/R.
Auto Trait Implementations§
impl<K, R> !RefUnwindSafe for ResponseWaiter<K, R>
impl<K, R> !UnwindSafe for ResponseWaiter<K, R>
impl<K, R> Freeze for ResponseWaiter<K, R>where
K: Freeze,
impl<K, R> Send for ResponseWaiter<K, R>
impl<K, R> Sync for ResponseWaiter<K, R>
impl<K, R> UnsafeUnpin for ResponseWaiter<K, R>where
K: UnsafeUnpin,
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<F> IntoFuture for Fwhere
F: Future,
impl<F> IntoFuture for Fwhere
F: Future,
Source§type IntoFuture = F
type IntoFuture = F
Which kind of future are we turning this into?
Source§fn into_future(self) -> <F as IntoFuture>::IntoFuture
fn into_future(self) -> <F as IntoFuture>::IntoFuture
Creates a future from a value. Read more