Skip to main content

AppState

Struct AppState 

Source
pub struct AppState {
Show 22 fields pub queue_size: usize, pub total_queued: usize, pub processed_count: usize, pub failed_count: usize, pub active_workers: usize, pub current_file: Option<String>, pub status: String, pub progress: u8, pub timestamp: f64, pub paused: bool, pub pause_reason: Option<String>, pub watched_folder_count: usize, pub active_server_route: Option<String>, pub last_successful_sync_at: Option<f64>, pub last_error: Option<String>, pub last_error_guidance: Option<String>, pub last_completed_file: Option<String>, pub diagnostics_exports: usize, pub recent_events: Vec<QueueEvent>, pub folder_statuses: HashMap<String, FolderSyncStatus>, pub transfer: TransferSnapshot, pub completed_upload_batches: u64,
}
Expand description

Contains shared progress counters exposed to the settings window.

Fields§

§queue_size: usize

Number of items remaining in background queue.

§total_queued: usize

Total number of items scheduled this session.

§processed_count: usize

Number of processed items during current session.

§failed_count: usize

Number of items failing transmission.

§active_workers: usize

In-flight worker count — not persisted to disk.

§current_file: Option<String>

Relative path of file currently undergoing transmission.

§status: String

Global application status label.

§progress: u8

Percentage progress indicator of active batch.

§timestamp: f64

Epoch timestamp of this state snapshot.

§paused: bool

True if all processing queues are manually paused.

§pause_reason: Option<String>

User or system reason why transmission is suspended.

§watched_folder_count: usize

Number of watched folders configured.

§active_server_route: Option<String>

Connection route label of the current session.

§last_successful_sync_at: Option<f64>

Epoch timestamp when the last sweep successfully finished.

§last_error: Option<String>

Diagnostic warning of the last critical error.

§last_error_guidance: Option<String>

Troubleshooting guidance instructions for last_error.

§last_completed_file: Option<String>

Filename of the last successfully processed asset.

§diagnostics_exports: usize

Count of diagnostic bundles exported.

§recent_events: Vec<QueueEvent>

Historic rolling logs of recent queue event results.

§folder_statuses: HashMap<String, FolderSyncStatus>

Current sync states mapped by watched folder paths.

§transfer: TransferSnapshot

Active metrics representing ongoing network transfers.

§completed_upload_batches: u64

Total completed batches of uploads executed.

Implementations§

Source§

impl AppState

Source

const MAX_EVENTS: usize = 80

Source

pub fn record_event( &mut self, path: impl Into<String>, status: impl Into<String>, detail: Option<String>, attempts: u32, )

Add or update a rolling queue event entry in history.

Source

pub fn reset_runtime_state(&mut self)

Discard in-progress transfer states at application boot time.

Trait Implementations§

Source§

impl Clone for AppState

Source§

fn clone(&self) -> AppState

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for AppState

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for AppState

Source§

fn default() -> Self

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

impl<'de> Deserialize<'de> for AppState

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for AppState

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
§

impl<T, Ctx> BundleDefault<Ctx> for T
where T: Default,

§

fn default_with_context(_: Ctx) -> T

Creates a default value with the given context.
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

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

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

fn in_current_span(self) -> Instrumented<Self>

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

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

Source§

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
§

impl<T> NoneValue for T
where T: Default,

§

type NoneType = T

§

fn null_value() -> T

The none-equivalent value.
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

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

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + 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
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + 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
§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = Infallible

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

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

Performs the conversion.
Source§

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

Source§

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

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

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

Performs the conversion.
§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self>

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