pub struct ProgressTracker {
pub current_file: usize,
pub total_files: usize,
pub current_filename: String,
pub current_stage: ProcessingStage,
pub current_page: usize,
pub total_pages: usize,
pub current_item: String,
/* private fields */
}Expand description
Progress tracker for PDF processing
Fields§
§current_file: usizeCurrent file number (1-based)
total_files: usizeTotal number of files
current_filename: StringCurrent filename
current_stage: ProcessingStageCurrent processing stage
current_page: usizeCurrent page number (1-based)
total_pages: usizeTotal number of pages
current_item: StringCurrent item being processed
Implementations§
Source§impl ProgressTracker
impl ProgressTracker
Sourcepub fn new(total_files: usize, output_mode: OutputMode) -> Self
pub fn new(total_files: usize, output_mode: OutputMode) -> Self
Create a new progress tracker
Sourcepub fn start_file(&mut self, file_number: usize, filename: &str)
pub fn start_file(&mut self, file_number: usize, filename: &str)
Start processing a new file
Sourcepub fn set_stage(&mut self, stage: ProcessingStage, total_pages: usize)
pub fn set_stage(&mut self, stage: ProcessingStage, total_pages: usize)
Set the current processing stage
Sourcepub fn update_page(&mut self, page_number: usize, item_name: &str)
pub fn update_page(&mut self, page_number: usize, item_name: &str)
Update page progress
Sourcepub fn complete_file(&mut self)
pub fn complete_file(&mut self)
Mark the current file as complete
Sourcepub fn elapsed_secs(&self) -> f64
pub fn elapsed_secs(&self) -> f64
Get elapsed time in seconds
Trait Implementations§
Source§impl Debug for ProgressTracker
impl Debug for ProgressTracker
Auto Trait Implementations§
impl Freeze for ProgressTracker
impl RefUnwindSafe for ProgressTracker
impl Send for ProgressTracker
impl Sync for ProgressTracker
impl Unpin for ProgressTracker
impl UnwindSafe for ProgressTracker
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().