[][src]Type Definition elastic::client::SyncClient

type SyncClient = Client<SyncSender>;

A synchronous Elasticsearch client.

Use a SyncClientBuilder to configure and build a SyncClient. For more details about the methods available to a SyncClient, see the base Client type.

Examples

Create a synchronous Client and send a ping request:

let client = SyncClientBuilder::new().build()?;

let response = client.request(PingRequest::new())
                     .send()?
                     .into_response::<PingResponse>()?;