pub trait SendAsync<M, R: Send + 'static> {
// Required method
fn send_async(
&self,
message: M,
) -> BoxFuture<'static, Result<R, AsyncSendError>>;
}
Expand description
Extension trait (not for anyone to implement), that allows a Sender<MessageWithCallback<M, R>> to be used to send a message and then getting a future of the response.
See AsyncSendError
for reasons that the future may resolve to an error result.