elastic / elasticsearch-rs

Official Elasticsearch Rust Client
https://www.elastic.co/guide/en/elasticsearch/client/rust-api/current/index.html
Apache License 2.0
12 stars 73 forks source link

Make associated body functions generic #18

Closed russcam closed 4 years ago

russcam commented 4 years ago

This commit makes body functions generic for those APIs that support sending a body, and removes the generic parameter on the associated API method on the root or namespaced_client. This makes it simpler to chain function calls, often with type inference being able to correctly infer the body type T from the argument. It also allows a builder to be cloned and for a different type of body to be set on the clone.

Closes #9

russcam commented 4 years ago

Opening PRs for awareness; merging this in.