Closed horacimacias closed 3 years ago
This PR does have some small but breaking changes to the API (using reference instead of owned struct) but I believe the changes resulting from it are still worth the update.
Merged the PR into develop
. Thanks!
This PR uses a
&mut
of a document instead of taking full ownership of the document passed. Main reason for this is to be able to do something like:so the document passed can still be referred to after executing an operation, otherwise only the Ok branch provides the document and the Err branch does not (so it's not possible to log the document for example, on error situations, without previously cloning the document which would be done before knowing if operation will succeed or not)
Also the operations taking a single document and operations taking multiple documents (e.g. bulk_docs) now have a closer signature (DocumentCreatedResult and Vec)