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

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(&params, request).unwrap();

Implementations on Foreign Types

impl SyncElasticClient for Client
[src]

[src]

Implementors