Type Definition elastic::client::requests::index_exists::IndexExistsRequestBuilder [] [src]

type IndexExistsRequestBuilder<TSender> = RequestBuilder<TSender, IndexExistsRequestInner>;

An index exists request builder that can be configured before sending.

Call Client.index_exists to get an IndexExistsRequestBuilder. The send method will either send the request synchronously or asynchronously, depending on the Client it was opend from.

Methods

impl IndexExistsRequestBuilder<SyncSender>
[src]

[src]

Send an IndexExistsRequestBuilder synchronously using a SyncClient.

This will block the current thread until a response arrives and is deserialised.

Examples

Check whether an index called myindex exists:

let response = client.index_exists(index("myindex")).send()?;

assert!(response.exists());

impl IndexExistsRequestBuilder<AsyncSender>
[src]

[src]

Send an IndexExistsRequestBuilder asynchronously using an AsyncClient.

This will return a future that will resolve to the deserialised command response.

Examples

Check whether an index called myindex exists:

let future = client.index_exists(index("myindex")).send();

future.and_then(|response| {
    assert!(response.exists());

    Ok(())
});