pub struct Status {
pub offline: bool,
pub syncing: bool,
pub out_of_space: bool,
pub pending_shares: bool,
pub update_required: bool,
pub pushing_files: Vec<Uuid>,
pub dirty_locally: Vec<Uuid>,
pub pulling_files: Vec<Uuid>,
pub space_used: Option<UsageMetrics>,
pub sync_status: Option<String>,
pub unexpected_sync_problem: Option<String>,
}Expand description
lb-rs may be used by multiple disconnected components which may not be able to seamlessly share state among one another. this struct provides a snapshot into what overall state of data and tasks are within lb-rs.
the fields are roughly in order of priority, if your UI has limited space to represent information (phones?) earlier fields are more important than later fields. Ideally anything with an ID is represented in the file tree itself.
Fields§
§offline: boolsome recent server interaction failed due to network conditions
syncing: boola sync is in progress
out_of_space: boolat-least one document cannot be pushed due to a data cap
there are pending shares
update_required: boolyou must update to be able to sync, see update_available below
pushing_files: Vec<Uuid>metadata or content for this id is being sent to the server
dirty_locally: Vec<Uuid>following files need to be pushed
pulling_files: Vec<Uuid>metadata or content for this id is being from the server callers should be prepared to handle ids they don’t know about yet.
space_used: Option<UsageMetrics>a mix of human readable and precise data for used, and available space
sync_status: Option<String>if there is no pending work this will have a human readable description of when we last synced successfully
unexpected_sync_problem: Option<String>Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Status
impl<'de> Deserialize<'de> for Status
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for Status
impl RefUnwindSafe for Status
impl Send for Status
impl Sync for Status
impl Unpin for Status
impl UnsafeUnpin for Status
impl UnwindSafe for Status
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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>
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>
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