pub struct StreamProgress {
pub name: &'static str,
pub total: AtomicU32,
pub completed: AtomicU32,
pub failed: AtomicU32,
pub is_dynamic: AtomicBool,
/* private fields */
}Expand description
Progress tracking for a single data stream
Fields§
§name: &'static strDisplay name for this stream
total: AtomicU32Total items to process
completed: AtomicU32Completed items
failed: AtomicU32Failed items
is_dynamic: AtomicBoolWhether this stream’s total is discovered dynamically (pagination, etc.)
Implementations§
Source§impl StreamProgress
impl StreamProgress
Sourcepub fn set_dynamic(&self, dynamic: bool)
pub fn set_dynamic(&self, dynamic: bool)
Mark this stream as having a dynamically discovered total
Sourcepub fn is_dynamic(&self) -> bool
pub fn is_dynamic(&self) -> bool
Check if this stream has a dynamic total
Sourcepub fn add_total(&self, count: u32)
pub fn add_total(&self, count: u32)
Add to total (for dynamic task generation like activities -> GPX)
Sourcepub fn complete_one(&self)
pub fn complete_one(&self)
Increment completed count
Sourcepub fn set_last_item(&self, desc: String)
pub fn set_last_item(&self, desc: String)
Set the last processed item description
Sourcepub fn get_last_item(&self) -> String
pub fn get_last_item(&self) -> String
Get the last processed item description
Sourcepub fn set_current_item(&self, desc: String)
pub fn set_current_item(&self, desc: String)
Set the current item being processed
Sourcepub fn get_current_item(&self) -> String
pub fn get_current_item(&self) -> String
Get the current item being processed
Sourcepub fn clear_current_item(&self)
pub fn clear_current_item(&self)
Clear the current item (when done processing)
Sourcepub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
Check if this stream is complete
Sourcepub fn get_completed(&self) -> u32
pub fn get_completed(&self) -> u32
Get completed count
Sourcepub fn get_failed(&self) -> u32
pub fn get_failed(&self) -> u32
Get failed count
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for StreamProgress
impl RefUnwindSafe for StreamProgress
impl Send for StreamProgress
impl Sync for StreamProgress
impl Unpin for StreamProgress
impl UnsafeUnpin for StreamProgress
impl UnwindSafe for StreamProgress
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