#[non_exhaustive]pub enum BatchError<E: Display> {
Tx,
Rx(RecvError),
Rejected(RejectionReason),
BatchFailed(E),
ResourceAcquisitionFailed(E),
Cancelled,
Panic,
}Expand description
An error that occurred while trying to batch.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Tx
Something went wrong while submitting an input for processing.
Unrecoverable.
Rx(RecvError)
Something went wrong while waiting for the output of a batch.
Unrecoverable.
Rejected(RejectionReason)
The current batch is full so the item was rejected.
Recoverable.
BatchFailed(E)
Something went wrong while processing a batch.
ResourceAcquisitionFailed(E)
Something went wrong while acquiring resources for processing.
Cancelled
The batch was cancelled before completion.
Panic
The batch processing (or resource acquisition) panicked.
Implementations§
Source§impl<E> BatchError<E>where
E: Display,
impl<E> BatchError<E>where
E: Display,
Sourcepub fn inner(self) -> Result<E, BatchError<E>>
pub fn inner(self) -> Result<E, BatchError<E>>
Get the inner error for general batch failures, otherwise self.
Trait Implementations§
Source§impl<E: Clone + Display> Clone for BatchError<E>
impl<E: Clone + Display> Clone for BatchError<E>
Source§fn clone(&self) -> BatchError<E>
fn clone(&self) -> BatchError<E>
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<E> Display for BatchError<E>
impl<E> Display for BatchError<E>
Source§impl<E: Display> Error for BatchError<E>
impl<E: Display> Error for BatchError<E>
1.30.0 · 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<E> Freeze for BatchError<E>where
E: Freeze,
impl<E> RefUnwindSafe for BatchError<E>where
E: RefUnwindSafe,
impl<E> Send for BatchError<E>where
E: Send,
impl<E> Sync for BatchError<E>where
E: Sync,
impl<E> Unpin for BatchError<E>where
E: Unpin,
impl<E> UnwindSafe for BatchError<E>where
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