pub struct BatchWriteSummary {
pub attempted: u64,
pub affected: u64,
pub failed: u64,
pub first_error: String,
pub errors: Vec<BatchWriteError>,
pub error_counts: Vec<BatchWriteErrorCount>,
pub errors_truncated: bool,
pub errors_omitted: u64,
}Expand description
Aggregate outcome of a batch write operation.
Fields§
§attempted: u64§affected: u64§failed: u64§first_error: String§errors: Vec<BatchWriteError>Bounded per-item refusal details in input order.
error_counts: Vec<BatchWriteErrorCount>Complete refusal counts even when errors reaches its cap.
errors_truncated: bool§errors_omitted: u64Implementations§
Source§impl BatchWriteSummary
impl BatchWriteSummary
Sourcepub fn record_failure(
&mut self,
index: usize,
item_id: Option<String>,
class: BatchWriteErrorClass,
retryability: BatchWriteRetryability,
message: impl Into<String>,
)
pub fn record_failure( &mut self, index: usize, item_id: Option<String>, class: BatchWriteErrorClass, retryability: BatchWriteRetryability, message: impl Into<String>, )
Record one best-effort item refusal while retaining the legacy aggregate and first-error fields.
Sourcepub fn record_failure_with(
&mut self,
index: usize,
class: BatchWriteErrorClass,
retryability: BatchWriteRetryability,
detail: impl FnOnce() -> (Option<String>, String),
)
pub fn record_failure_with( &mut self, index: usize, class: BatchWriteErrorClass, retryability: BatchWriteRetryability, detail: impl FnOnce() -> (Option<String>, String), )
Record a refusal without constructing an item identity or message that
will be omitted. The closure runs only for a sampled detail or when the
legacy first_error still needs to be populated.
Trait Implementations§
Source§impl Clone for BatchWriteSummary
impl Clone for BatchWriteSummary
Source§impl Debug for BatchWriteSummary
impl Debug for BatchWriteSummary
Source§impl Default for BatchWriteSummary
impl Default for BatchWriteSummary
Source§impl<'de> Deserialize<'de> for BatchWriteSummary
impl<'de> Deserialize<'de> for BatchWriteSummary
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for BatchWriteSummary
impl RefUnwindSafe for BatchWriteSummary
impl Send for BatchWriteSummary
impl Sync for BatchWriteSummary
impl Unpin for BatchWriteSummary
impl UnsafeUnpin for BatchWriteSummary
impl UnwindSafe for BatchWriteSummary
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