#[non_exhaustive]pub enum TaskGroupError<E> {
ZeroConcurrency,
ExcessiveConcurrency {
max_concurrency: usize,
upper_bound: usize,
},
TaskFailed {
index: usize,
error: E,
},
TaskJoinFailed {
index: Option<usize>,
source: JoinError,
},
}Expand description
Error returned by bounded task helpers.
Operation errors preserve the caller-provided error as std::error::Error
source when E implements Error. Tokio join failures expose the original
JoinError as the source so callers can distinguish panics from external
task cancellation.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ZeroConcurrency
max_concurrency must be greater than zero.
ExcessiveConcurrency
max_concurrency exceeded MAX_CONCURRENCY.
Fields
TaskFailed
An operation failed while running in first-error mode.
TaskJoinFailed
A spawned Tokio task failed to join.
Fields
index: Option<usize>Zero-based input index when the failed task reported it.
Current helper implementations return None for Tokio join failures
because JoinSet reports panics and runtime cancellation without
the task’s input index. Future helper variants may use Some if they
can preserve that association.
Trait Implementations§
Source§impl<E: Debug> Debug for TaskGroupError<E>
impl<E: Debug> Debug for TaskGroupError<E>
Source§impl<E> Display for TaskGroupError<E>where
E: Display,
impl<E> Display for TaskGroupError<E>where
E: Display,
Source§impl<E> Error for TaskGroupError<E>where
E: Error + 'static,
impl<E> Error for TaskGroupError<E>where
E: Error + 'static,
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()