pub struct BulkOperationResult<E> {
pub succeeded: Vec<E>,
pub failed: Vec<(usize, String)>,
pub total: usize,
}Expand description
Aggregated result of a completed bulk operation.
Fields§
§succeeded: Vec<E>§failed: Vec<(usize, String)>§total: usizeImplementations§
Source§impl<E: Clone> BulkOperationResult<E>
impl<E: Clone> BulkOperationResult<E>
pub fn new() -> Self
pub fn success_count(&self) -> usize
pub fn failure_count(&self) -> usize
pub fn is_fully_successful(&self) -> bool
Sourcepub fn into_item_results(self) -> Vec<BulkItemResult<E>>
pub fn into_item_results(self) -> Vec<BulkItemResult<E>>
Flatten into an ordered list of per-item results, indexed by insertion order.
Succeeded items are assigned consecutive indices starting at 0;
failed items use the original input index from (index, reason).
Trait Implementations§
Source§impl<E: Clone> Clone for BulkOperationResult<E>
impl<E: Clone> Clone for BulkOperationResult<E>
Source§impl<E: Debug> Debug for BulkOperationResult<E>
impl<E: Debug> Debug for BulkOperationResult<E>
Auto Trait Implementations§
impl<E> Freeze for BulkOperationResult<E>
impl<E> RefUnwindSafe for BulkOperationResult<E>where
Vec<E>: RefUnwindSafe,
impl<E> Send for BulkOperationResult<E>
impl<E> Sync for BulkOperationResult<E>
impl<E> Unpin for BulkOperationResult<E>
impl<E> UnsafeUnpin for BulkOperationResult<E>where
Vec<E>: UnsafeUnpin,
impl<E> UnwindSafe for BulkOperationResult<E>where
Vec<E>: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more