pub enum BackendEvent {
Synced {
upserted: usize,
removed: usize,
},
FileChanged {
path: PathBuf,
},
FileRemoved {
path: PathBuf,
},
Error {
message: String,
},
SyncDelivered {
device_id: GrainId,
device_name: String,
},
}Expand description
Events a server publishes so a client can react without polling.
Variants§
Synced
A sync cycle finished.
FileChanged
A single file changed through the server.
FileRemoved
A single file was removed through the server.
Error
A background operation failed. Carries a human-readable message.
SyncDelivered
Every edit this device made to the synced workspace has reached at least one peer: the peer applied it and wrote its content, so it survives this device going to sleep or away.
Sent once per batch of edits, when the last of them lands, not once per peer: a second
peer catching up later says nothing new. Edits made before sync started on this
server are not waited for. SyncStatusResult::pending_delivery says the same thing
to a client that asks instead.
Trait Implementations§
Source§impl Clone for BackendEvent
impl Clone for BackendEvent
Source§impl Debug for BackendEvent
impl Debug for BackendEvent
Source§impl<'de> Deserialize<'de> for BackendEvent
impl<'de> Deserialize<'de> for BackendEvent
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 Eq for BackendEvent
Source§impl PartialEq for BackendEvent
impl PartialEq for BackendEvent
Source§impl Serialize for BackendEvent
impl Serialize for BackendEvent
impl StructuralPartialEq for BackendEvent
Auto Trait Implementations§
impl Forget for BackendEvent
impl Freeze for BackendEvent
impl Move for BackendEvent
impl RefUnwindSafe for BackendEvent
impl Send for BackendEvent
impl Sync for BackendEvent
impl Unpin for BackendEvent
impl UnsafeUnpin for BackendEvent
impl UnwindSafe for BackendEvent
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