SyncProgress

Struct SyncProgress 

Source
pub struct SyncProgress {
    pub activities: StreamProgress,
    pub gpx: StreamProgress,
    pub health: StreamProgress,
    pub performance: StreamProgress,
    pub start_time: Instant,
    pub profile_name: Mutex<String>,
    pub date_range: Mutex<String>,
    pub rate_history: Mutex<Vec<u32>>,
    pub total_requests: AtomicU32,
}
Expand description

Overall sync progress across all streams

Fields§

§activities: StreamProgress

Activities stream progress

§gpx: StreamProgress

GPX downloads progress

§health: StreamProgress

Health data progress

§performance: StreamProgress

Performance metrics progress

§start_time: Instant

Start time for ETA calculation

§profile_name: Mutex<String>

User profile name

§date_range: Mutex<String>

Date range being synced

§rate_history: Mutex<Vec<u32>>

Request rate history (last 60 seconds)

§total_requests: AtomicU32

Total requests made

Implementations§

Source§

impl SyncProgress

Source

pub fn new() -> Self

Create new sync progress tracker

Source

pub fn set_profile(&self, name: &str)

Set profile name

Source

pub fn get_profile(&self) -> String

Get profile name

Source

pub fn set_date_range(&self, from: &str, to: &str)

Set date range

Source

pub fn get_date_range(&self) -> String

Get date range

Source

pub fn record_request(&self)

Record a request for rate tracking

Source

pub fn update_rate_history(&self)

Update rate history (call once per second)

Source

pub fn requests_per_minute(&self) -> u32

Get rate per minute (average over last minute)

Source

pub fn elapsed_str(&self) -> String

Get elapsed time as formatted string

Source

pub fn eta_str(&self) -> String

Estimate time remaining

Source

pub fn total_remaining(&self) -> u32

Get total items remaining across all streams

Source

pub fn total_completed(&self) -> u32

Get total completed across all streams

Source

pub fn total_failed(&self) -> u32

Get total failed across all streams

Source

pub fn is_complete(&self) -> bool

Check if all streams are complete

Source

pub fn print_simple_status(&self)

Print simple status line (for –simple mode)

Trait Implementations§

Source§

impl Default for SyncProgress

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,