pub struct BatchGenerateRequest {
pub requests: Vec<GenerateRequest>,
pub batch_config: Option<BatchOperationConfig>,
pub parallel_execution: bool,
pub fail_fast: bool,
pub timeout: Option<Duration>,
}Expand description
Request structure for batch generation operations
Fields§
§requests: Vec<GenerateRequest>List of generation requests to process in batch
batch_config: Option<BatchOperationConfig>Batch operation configuration
parallel_execution: boolEnable parallel execution of requests
fail_fast: boolStop processing on first error
timeout: Option<Duration>Overall timeout for the entire batch
Implementations§
Source§impl BatchGenerateRequest
impl BatchGenerateRequest
Sourcepub fn new(requests: Vec<GenerateRequest>) -> Self
pub fn new(requests: Vec<GenerateRequest>) -> Self
Create a new batch generation request
Sourcepub fn with_config(self, config: BatchOperationConfig) -> Self
pub fn with_config(self, config: BatchOperationConfig) -> Self
Set batch configuration
Sourcepub fn with_parallel_execution(self, parallel: bool) -> Self
pub fn with_parallel_execution(self, parallel: bool) -> Self
Set parallel execution mode
Sourcepub fn with_fail_fast(self, fail_fast: bool) -> Self
pub fn with_fail_fast(self, fail_fast: bool) -> Self
Set fail-fast behavior
Sourcepub fn with_timeout(self, timeout: Duration) -> Self
pub fn with_timeout(self, timeout: Duration) -> Self
Set batch timeout
Sourcepub fn request_count(&self) -> usize
pub fn request_count(&self) -> usize
Get the number of requests in this batch
Trait Implementations§
Source§impl Clone for BatchGenerateRequest
impl Clone for BatchGenerateRequest
Source§fn clone(&self) -> BatchGenerateRequest
fn clone(&self) -> BatchGenerateRequest
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BatchGenerateRequest
impl Debug for BatchGenerateRequest
Auto Trait Implementations§
impl Freeze for BatchGenerateRequest
impl RefUnwindSafe for BatchGenerateRequest
impl Send for BatchGenerateRequest
impl Sync for BatchGenerateRequest
impl Unpin for BatchGenerateRequest
impl UnsafeUnpin for BatchGenerateRequest
impl UnwindSafe for BatchGenerateRequest
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