Trait elastic_reqwest::sync::SyncElasticClient
[−]
[src]
pub trait SyncElasticClient: Sealed { fn elastic_req<I, B>(
&self,
params: &RequestParams,
req: I
) -> Result<Response, Error>
where
I: Into<HttpRequest<'static, B>>,
B: Into<SyncBody>; }
Represents a client that can send Elasticsearch requests synchronously.
Required Methods
fn elastic_req<I, B>(
&self,
params: &RequestParams,
req: I
) -> Result<Response, Error> where
I: Into<HttpRequest<'static, B>>,
B: Into<SyncBody>,
&self,
params: &RequestParams,
req: I
) -> Result<Response, Error> where
I: Into<HttpRequest<'static, B>>,
B: Into<SyncBody>,
Send a request and get a response.
Examples
Bring the SyncElasticClient
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::SyncElasticClient; let (client, params) = elastic_reqwest::sync::default().unwrap(); let http_res = client.elastic_req(¶ms, request).unwrap();
Implementations on Foreign Types
impl SyncElasticClient for Client
[src]
fn elastic_req<I, B>(
&self,
params: &RequestParams,
req: I
) -> Result<Response, Error> where
I: Into<HttpRequest<'static, B>>,
B: Into<SyncBody>,
[src]
&self,
params: &RequestParams,
req: I
) -> Result<Response, Error> where
I: Into<HttpRequest<'static, B>>,
B: Into<SyncBody>,