To make the function call similar to the previous examples, I have made changes to the main function call from run() to main().
There was also a build error in Making API calls example at the line:
search_response.json::<Value>().await?;
I have added code to make it work.
To make the function call similar to the previous examples, I have made changes to the main function call from
run()
tomain()
. There was also a build error inMaking API calls
example at the line:search_response.json::<Value>().await?;
I have added code to make it work.Alongwith this I wanted to point out that in https://github.com/elastic/elasticsearch-rs/blob/master/elasticsearch/src/lib.rs as well as https://github.com/elastic/elasticsearch-rs/blob/master/elasticsearch/docs/, the main function calls are run. I hope it will help you to have calling convention across these references.