pub struct ParallelResult<T> {
pub results: Vec<(usize, T)>,
pub errors: Vec<(usize, String)>,
pub duration: Duration,
pub processed_count: usize,
}Expand description
Result of parallel processing
Fields§
§results: Vec<(usize, T)>Successful results with their original indices
errors: Vec<(usize, String)>Errors with their indices and messages
duration: DurationTotal processing duration
processed_count: usizeNumber of items processed
Implementations§
Source§impl<T> ParallelResult<T>
impl<T> ParallelResult<T>
Sourcepub fn is_success(&self) -> bool
pub fn is_success(&self) -> bool
Check if all items were processed successfully
Sourcepub fn success_rate(&self) -> f64
pub fn success_rate(&self) -> f64
Get success rate as a percentage
Sourcepub fn ordered_results(self) -> Vec<T>
pub fn ordered_results(self) -> Vec<T>
Get ordered results (sorted by original index)
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for ParallelResult<T>
impl<T> RefUnwindSafe for ParallelResult<T>where
T: RefUnwindSafe,
impl<T> Send for ParallelResult<T>where
T: Send,
impl<T> Sync for ParallelResult<T>where
T: Sync,
impl<T> Unpin for ParallelResult<T>where
T: Unpin,
impl<T> UnwindSafe for ParallelResult<T>where
T: UnwindSafe,
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more