pub trait AsyncClient {
type Error: Error + Send + Sync + 'static;
// Required method
fn send(
&self,
request: HttpRequest,
) -> impl Future<Output = Result<HttpResponse, Self::Error>> + Send;
}Expand description
The same, for a caller inside a runtime. Send on the future so that a
call can be tokio::spawned.
Required Associated Types§
Required Methods§
fn send( &self, request: HttpRequest, ) -> impl Future<Output = Result<HttpResponse, Self::Error>> + Send
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".