pub struct BatchResult<T, E> {
pub successes: Vec<(usize, T)>,
pub failures: Vec<(usize, E)>,
pub execution_time: Duration,
pub total_processed: usize,
}Fields§
§successes: Vec<(usize, T)>§failures: Vec<(usize, E)>§execution_time: Duration§total_processed: usizeImplementations§
Source§impl<T, E> BatchResult<T, E>
impl<T, E> BatchResult<T, E>
pub fn new() -> Self
pub fn add_success(&mut self, i: usize, r: T)
pub fn add_failure(&mut self, i: usize, e: E)
pub fn all_succeeded(&self) -> bool
pub fn success_count(&self) -> usize
pub fn failure_count(&self) -> usize
pub fn success_rate(&self) -> f64
Trait Implementations§
Source§impl<T: Clone, E: Clone> Clone for BatchResult<T, E>
impl<T: Clone, E: Clone> Clone for BatchResult<T, E>
Source§fn clone(&self) -> BatchResult<T, E>
fn clone(&self) -> BatchResult<T, E>
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<T, E> Freeze for BatchResult<T, E>
impl<T, E> RefUnwindSafe for BatchResult<T, E>where
T: RefUnwindSafe,
E: RefUnwindSafe,
impl<T, E> Send for BatchResult<T, E>
impl<T, E> Sync for BatchResult<T, E>
impl<T, E> Unpin for BatchResult<T, E>
impl<T, E> UnwindSafe for BatchResult<T, E>where
T: UnwindSafe,
E: 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