pub struct Response<Res> { /* private fields */ }Expand description
Response<Res> is used to asynchronously wait for and retrieve the result of a Request<Req, Res> sent to a Actor.
Implementations§
Source§impl<Res> Response<Res>
impl<Res> Response<Res>
Sourcepub async fn recv(self) -> Result<Res, ReqErr>
pub async fn recv(self) -> Result<Res, ReqErr>
Asynchronously wait for a value from this channel,
returning an error if the corresponding Request<_,_> has been dropped.
Sourcepub async fn recv_timeout(self, dur: Duration) -> Result<Res, ReqErr>
pub async fn recv_timeout(self, dur: Duration) -> Result<Res, ReqErr>
Asynchronously wait for a value from this channel,
returning an error if the given Duration elapses before
receiving the expected response, or if the corresponding Request<_,_> has been dropped.
Trait Implementations§
Auto Trait Implementations§
impl<Res> Freeze for Response<Res>
impl<Res> RefUnwindSafe for Response<Res>
impl<Res> Send for Response<Res>where
Res: Send,
impl<Res> Sync for Response<Res>where
Res: Send,
impl<Res> Unpin for Response<Res>
impl<Res> UnsafeUnpin for Response<Res>
impl<Res> UnwindSafe for Response<Res>
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