pub struct ResponseFuture<T, O = Result<T, Error>> {
deadline: Sleep,
response: Option<Receiver<Result<Message, Error>>>,
msg_id: u16,
decode: fn(Message) -> Result<T, Error>,
map: fn(Result<T, Error>) -> O,
}Expand description
Waits for the response to a request.
.await on a RequestBuilder sends the request and returns this
future. It doesn’t borrow the client.
Fields§
§deadline: Sleep§response: Option<Receiver<Result<Message, Error>>>§msg_id: u16§decode: fn(Message) -> Result<T, Error>§map: fn(Result<T, Error>) -> OTrait Implementations§
§impl<T, O> Debug for ResponseFuture<T, O>
impl<T, O> Debug for ResponseFuture<T, O>
§impl<T, O> Future for ResponseFuture<T, O>
impl<T, O> Future for ResponseFuture<T, O>
impl<'__pin, T, O> Unpin for ResponseFuture<T, O>where
PinnedFieldsOf<__Origin<'__pin, T, O>>: Unpin,
Auto Trait Implementations§
impl<T, O = Result<T, Error>> !Freeze for ResponseFuture<T, O>
impl<T, O = Result<T, Error>> !RefUnwindSafe for ResponseFuture<T, O>
impl<T, O = Result<T, Error>> !UnsafeUnpin for ResponseFuture<T, O>
impl<T, O = Result<T, Error>> !UnwindSafe for ResponseFuture<T, O>
impl<T, O> Send for ResponseFuture<T, O>
impl<T, O> Sync for ResponseFuture<T, O>
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
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