[][src]Type Definition elastic::client::requests::index_delete::IndexDeleteRequestBuilder

type IndexDeleteRequestBuilder<TSender> = RequestBuilder<TSender, IndexDeleteRequestInner>;

A delete index request builder that can be configured before sending.

Call Client.index_delete to get an IndexDeleteRequestBuilder. The send method will either send the request synchronously or asynchronously, depending on the Client it was deleted from.

Methods

impl IndexDeleteRequestBuilder<SyncSender>[src]

pub fn send(self) -> Result<CommandResponse>[src]

Send a IndexDeleteRequestBuilder synchronously using a SyncClient.

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

Examples

Delete an index called myindex:

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

assert!(response.acknowledged());

impl IndexDeleteRequestBuilder<AsyncSender>[src]

pub fn send(self) -> Pending[src]

Send a IndexDeleteRequestBuilder asynchronously using an AsyncClient.

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

Examples

Delete an index called myindex:

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

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

    Ok(())
});