Is your feature request related to a problem? Please describe.
I am needing to implement retry logic for my requests as we're very occasionally encountering 502s on AWS. For most requests this can be done fairly easily, as .body() can take a borrowed value.
However, Bulk requests require taking ownership of the Vec<BulkOperation<..>>, and additionally BulkOperation doesn't implement clone – so the only way around this is to make your own bulk operation struct that can be cloned then converted.
Describe the solution you'd like
There are a few possible solutions of varying complexity and effort required:
implementing exponential back off within the crate itself
make NdBody take a reference to the body vec, rather than ownership
simply derive Clone on BulkOperation (and maybe other structs of similar usage)
I'd happily provide a PR for the last two, although the first is certainly a far more complex solution that mightn't be desired.
Is your feature request related to a problem? Please describe. I am needing to implement retry logic for my requests as we're very occasionally encountering 502s on AWS. For most requests this can be done fairly easily, as
.body()
can take a borrowed value.However,
Bulk
requests require taking ownership of theVec<BulkOperation<..>>
, and additionallyBulkOperation
doesn't implement clone – so the only way around this is to make your own bulk operation struct that can be cloned then converted.Describe the solution you'd like There are a few possible solutions of varying complexity and effort required:
NdBody
take a reference to the body vec, rather than ownershipClone
onBulkOperation
(and maybe other structs of similar usage)I'd happily provide a PR for the last two, although the first is certainly a far more complex solution that mightn't be desired.