pub struct BatchResult {
pub total: usize,
pub success: usize,
pub changed: usize,
pub failed: usize,
pub duration: Duration,
pub errors: Vec<(PathBuf, Error)>,
}Expand description
Aggregated results from batch processing.
Fields§
§total: usizeTotal number of files processed
success: usizeNumber of files successfully processed
changed: usizeNumber of files changed
failed: usizeNumber of files that failed processing
duration: DurationTotal processing duration
errors: Vec<(PathBuf, Error)>List of errors with file paths
Implementations§
Source§impl BatchResult
impl BatchResult
Sourcepub fn from_results(results: Vec<FileResult>) -> Self
pub fn from_results(results: Vec<FileResult>) -> Self
Creates a BatchResult from a list of FileResults
Sourcepub const fn is_success(&self) -> bool
pub const fn is_success(&self) -> bool
Returns true if all files were processed successfully
Sourcepub fn files_per_second(&self) -> f64
pub fn files_per_second(&self) -> f64
Calculates files processed per second
Trait Implementations§
Source§impl Debug for BatchResult
impl Debug for BatchResult
Source§impl Default for BatchResult
impl Default for BatchResult
Source§fn default() -> BatchResult
fn default() -> BatchResult
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for BatchResult
impl !RefUnwindSafe for BatchResult
impl Send for BatchResult
impl Sync for BatchResult
impl Unpin for BatchResult
impl !UnwindSafe for BatchResult
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