1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
/*******************************************************************************
*
* Copyright (c) 2025 - 2026 Haixing Hu.
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0.
*
******************************************************************************/
//! Batch-oriented task execution utilities.
//!
//! This crate focuses on one-shot execution of whole task batches rather than
//! single-task submission services.
//!
//! Core types are re-exported from the crate root, so callers can import the
//! executor trait, result type, and concrete implementation together.
//!
//! ```rust
//! use qubit_batch::{
//! BatchExecutor,
//! BatchOutcome,
//! SequentialBatchExecutor,
//! };
//!
//! let outcome: BatchOutcome<&'static str> = SequentialBatchExecutor::new()
//! .for_each([1, 2, 3], |value| {
//! assert!(value > 0);
//! Ok::<(), &'static str>(())
//! })
//! .expect("array length should be exact");
//!
//! assert!(outcome.is_success());
//! ```
//!
//! [`BatchExecutionState`] is public so runtime-specific executor crates can
//! reuse the same accounting and outcome-building rules as the built-in
//! executors.
//!
//! # Progress Interval Semantics
//!
//! Progress reporting has explicit lifecycle events plus optional running
//! events. A `report_interval` is a throttle checked only when an implementation
//! reaches one of its running-progress points; it is not a timer guarantee that
//! a running event is emitted immediately when that duration passes. Passing
//! [`std::time::Duration::ZERO`] disables time throttling, so each
//! implementation-defined running-progress point reports as soon as it is
//! reached. Sequential variants reach those points between tasks or items.
//! Chunked processing reaches them after a chunk completes. Parallel variants
//! report from a scoped reporter thread; with a positive interval they can also
//! emit periodic running events while workers are active, while zero interval
//! reports on worker completion signals and does not spin in a tight loop.
//!
pub
pub use ;
pub use ;