pub struct BatchProcessor { /* private fields */ }Expand description
Batch processor for executing multiple API operations
Implementations§
Source§impl BatchProcessor
impl BatchProcessor
Sourcepub fn new(config: BatchConfig) -> Self
pub fn new(config: BatchConfig) -> Self
Creates a new batch processor with the given configuration
§Panics
Panics if the rate limit is configured as 0 (which would be invalid)
Sourcepub async fn parse_batch_file(path: &Path) -> Result<BatchFile, Error>
pub async fn parse_batch_file(path: &Path) -> Result<BatchFile, Error>
Parses a batch file from the given path
§Errors
Returns an error if:
- The file cannot be read
- The file is not valid JSON or YAML
- The file structure doesn’t match the expected
BatchFileformat
Sourcepub async fn execute_batch(
&self,
spec: &CachedSpec,
batch_file: BatchFile,
global_config: Option<&GlobalConfig>,
base_url: Option<&str>,
dry_run: bool,
output_format: &OutputFormat,
jq_filter: Option<&str>,
) -> Result<BatchResult, Error>
pub async fn execute_batch( &self, spec: &CachedSpec, batch_file: BatchFile, global_config: Option<&GlobalConfig>, base_url: Option<&str>, dry_run: bool, output_format: &OutputFormat, jq_filter: Option<&str>, ) -> Result<BatchResult, Error>
Executes a batch of operations.
If the batch uses dependency features (capture, capture_append, or
depends_on), operations are executed sequentially in topological order
with variable interpolation and atomic failure semantics.
Otherwise, operations are executed concurrently using the original parallel execution strategy.
§Errors
Returns an error if:
- The dependency graph is invalid (cycles, missing refs)
- Any operation fails in dependent mode (atomic execution)
- Any operation fails and
continue_on_erroris false in concurrent mode
§Panics
Panics if the semaphore is poisoned (should not happen in normal operation)
Auto Trait Implementations§
impl Freeze for BatchProcessor
impl RefUnwindSafe for BatchProcessor
impl Send for BatchProcessor
impl Sync for BatchProcessor
impl Unpin for BatchProcessor
impl UnsafeUnpin for BatchProcessor
impl UnwindSafe for BatchProcessor
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