pub struct BulkMutationError<E>{ /* private fields */ }Expand description
An error which occurred while mutating the state not allowing the operation to proceed any further but also having some part of the operation complete.
Implementations§
Source§impl<E> BulkMutationError<E>
impl<E> BulkMutationError<E>
Sourcepub fn empty_with_error(error: E) -> Self
pub fn empty_with_error(error: E) -> Self
Creates a new mutation error from the provided inner error.
This essentially means that what ever change that was going to happen was atomic and has therefore been revered.
WARNING: You should under no circumstances return an empty mutation error if any part of the state has been mutated and will not be reversed. Doing so will lead to state divergence within the cluster
Sourcepub fn new(error: E, successful_doc_ids: Vec<Key>) -> Self
pub fn new(error: E, successful_doc_ids: Vec<Key>) -> Self
Creates a new mutation error from the provided inner error.
This essentially means that although we ran into an error, we were able to complete some part of the operation on some documents.
WARNING: You should under no circumstances return an empty mutation error if any part of the state has been mutated and will not be reversed. Doing so will lead to state divergence within the cluster
Sourcepub fn into_inner(self) -> E
pub fn into_inner(self) -> E
Consumes the error returning the inner error.
Sourcepub fn successful_doc_ids(&self) -> &[Key] ⓘ
pub fn successful_doc_ids(&self) -> &[Key] ⓘ
The document ids which the operation was successful on.