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>
Auto Trait Implementations§
impl Freeze for BatchProcessor
impl RefUnwindSafe for BatchProcessor
impl Send for BatchProcessor
impl Sync for BatchProcessor
impl Unpin 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