pub struct StreamProgress {
pub name: &'static str,
pub total: AtomicU32,
pub completed: AtomicU32,
pub failed: AtomicU32,
/* 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
Implementations§
Source§impl StreamProgress
impl StreamProgress
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 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 UnwindSafe for StreamProgress
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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