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§
Auto Trait Implementations§
impl Freeze for Status
impl RefUnwindSafe for Status
impl Send for Status
impl Sync for Status
impl Unpin 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,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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