pub struct BatchGenerationResult {
pub results: Vec<BatchItemResult>,
pub total: usize,
pub successful: usize,
pub failed: usize,
pub duration: Duration,
}Expand description
Result of a batch generation operation
Fields§
§results: Vec<BatchItemResult>Results for each item in the batch
total: usizeTotal number of requests
successful: usizeNumber of successful requests
failed: usizeNumber of failed requests
duration: DurationTotal duration of the batch operation
Implementations§
Source§impl BatchGenerationResult
impl BatchGenerationResult
Sourcepub fn new(results: Vec<BatchItemResult>, duration: Duration) -> Self
pub fn new(results: Vec<BatchItemResult>, duration: Duration) -> Self
Create a new batch generation result
Sourcepub fn successes(&self) -> Vec<&GenerationResult>
pub fn successes(&self) -> Vec<&GenerationResult>
Get all successful results
Sourcepub fn all_succeeded(&self) -> bool
pub fn all_succeeded(&self) -> bool
Check if all requests succeeded
Sourcepub fn any_failed(&self) -> bool
pub fn any_failed(&self) -> bool
Check if any request failed
Trait Implementations§
Source§impl Clone for BatchGenerationResult
impl Clone for BatchGenerationResult
Source§fn clone(&self) -> BatchGenerationResult
fn clone(&self) -> BatchGenerationResult
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for BatchGenerationResult
impl RefUnwindSafe for BatchGenerationResult
impl Send for BatchGenerationResult
impl Sync for BatchGenerationResult
impl Unpin for BatchGenerationResult
impl UnwindSafe for BatchGenerationResult
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