pub enum SyncState {
Synced,
Syncing,
Queued,
Conflict,
Error,
}Expand description
Synchronization state for an item or collection.
Used to indicate whether content is fully synced, currently syncing, queued for sync, or has conflicts that need resolution.
Variants§
Synced
Content is fully synchronized with peers.
Syncing
Content is currently being synchronized.
Queued
Content is queued for sync (offline or pending).
Conflict
Content has conflicts that need resolution.
Error
Sync failed with an error.
Implementations§
Source§impl SyncState
impl SyncState
Sourcepub fn needs_attention(&self) -> bool
pub fn needs_attention(&self) -> bool
Returns true if this state requires user attention.
Sourcepub fn is_pending(&self) -> bool
pub fn is_pending(&self) -> bool
Returns true if sync is in progress or pending.
Sourcepub fn color_class(&self) -> &'static str
pub fn color_class(&self) -> &'static str
Returns the appropriate color class for this state.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SyncState
impl<'de> Deserialize<'de> for SyncState
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Copy for SyncState
impl Eq for SyncState
impl StructuralPartialEq for SyncState
Auto Trait Implementations§
impl Freeze for SyncState
impl RefUnwindSafe for SyncState
impl Send for SyncState
impl Sync for SyncState
impl Unpin for SyncState
impl UnsafeUnpin for SyncState
impl UnwindSafe for SyncState
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
Mutably borrows from an owned value. Read more