pub struct BatchError {
pub request_index: usize,
pub error_code: String,
pub error_message: String,
pub recoverable: bool,
}Expand description
Error information for a failed request in a batch
Fields§
§request_index: usizeIndex of the failed request in the original batch
error_code: StringError code categorizing the failure
error_message: StringHuman-readable error message
recoverable: boolWhether this error is recoverable through retry
Implementations§
Source§impl BatchError
impl BatchError
Sourcepub fn new(
request_index: usize,
error_code: String,
error_message: String,
recoverable: bool,
) -> Self
pub fn new( request_index: usize, error_code: String, error_message: String, recoverable: bool, ) -> Self
Create a new batch error
Sourcepub fn recoverable(
request_index: usize,
error_code: String,
error_message: String,
) -> Self
pub fn recoverable( request_index: usize, error_code: String, error_message: String, ) -> Self
Create a recoverable error
Sourcepub fn non_recoverable(
request_index: usize,
error_code: String,
error_message: String,
) -> Self
pub fn non_recoverable( request_index: usize, error_code: String, error_message: String, ) -> Self
Create a non-recoverable error
Sourcepub fn is_recoverable(&self) -> bool
pub fn is_recoverable(&self) -> bool
Check if this error is recoverable
Trait Implementations§
Source§impl Clone for BatchError
impl Clone for BatchError
Source§fn clone(&self) -> BatchError
fn clone(&self) -> BatchError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BatchError
impl Debug for BatchError
Auto Trait Implementations§
impl Freeze for BatchError
impl RefUnwindSafe for BatchError
impl Send for BatchError
impl Sync for BatchError
impl Unpin for BatchError
impl UnwindSafe for BatchError
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