pub enum BatchError {
TaskFailed(JoinError),
}Expand description
Error returned when a single document in a batch fails to process.
Batch APIs surface this per-document so a panic or cancellation in one document does not abort the entire batch run.
Variants§
Implementations§
Source§impl BatchError
impl BatchError
Sourcepub fn is_panic(&self) -> bool
pub fn is_panic(&self) -> bool
Returns true if the error was caused by a panic in the worker task.
CI pipelines and supervisors should treat this as an application bug that warrants investigation (not a transient infrastructure issue).
Sourcepub fn is_cancelled(&self) -> bool
pub fn is_cancelled(&self) -> bool
Returns true if the error was caused by task cancellation (e.g.,
runtime shutdown, explicit abort).
Cancellation is an expected operational event — callers that see this during a graceful shutdown should typically log-and-continue, not alert.
Trait Implementations§
Source§impl Debug for BatchError
impl Debug for BatchError
Source§impl Display for BatchError
impl Display for BatchError
Source§impl Error for BatchError
impl Error for BatchError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for BatchError
impl !RefUnwindSafe for BatchError
impl Send for BatchError
impl Sync for BatchError
impl Unpin for BatchError
impl UnsafeUnpin 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