Trait elastic_reqwest::async::AsyncElasticClient
[−]
[src]
pub trait AsyncElasticClient: Sealed { fn elastic_req<I, B>(&self, params: &RequestParams, req: I) -> Pending
where
I: Into<HttpRequest<'static, B>>,
B: Into<AsyncBody>; }
Represents a client that can send Elasticsearch requests asynchronously.
Required Methods
fn elastic_req<I, B>(&self, params: &RequestParams, req: I) -> Pending where
I: Into<HttpRequest<'static, B>>,
B: Into<AsyncBody>,
I: Into<HttpRequest<'static, B>>,
B: Into<AsyncBody>,
Send a request and get a response.
Examples
Bring the AsyncElasticClient
trait into scope and call elastic_req
with any type that can be converted into a req::HttpRequest
.
This method returns a raw reqwest::Response
.
use elastic_reqwest::AsyncElasticClient; let (client, params) = elastic_reqwest::async::default(&core.handle()).unwrap(); let http_future = client.elastic_req(¶ms, request); core.run(http_future).unwrap();
Implementations on Foreign Types
impl AsyncElasticClient for Client
[src]
fn elastic_req<I, B>(&self, params: &RequestParams, req: I) -> Pending where
I: Into<HttpRequest<'static, B>>,
B: Into<AsyncBody>,
[src]
I: Into<HttpRequest<'static, B>>,
B: Into<AsyncBody>,