#[derive(serde::Serialize, serde::Deserialize, PartialEq)]
pub enum SyncStatus {
Conflict,
NoConflict,
ClientEditedServerDeleted,
ClientDeletedServerEdited,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(tag = "action")]
pub enum SyncResponseFile {
Add {
path: String,
status: SyncStatus,
content: Vec<u8>,
},
Update {
path: String,
status: SyncStatus,
content: Vec<u8>,
},
Delete {
path: String,
status: SyncStatus,
content: Vec<u8>,
},
}
#[derive(serde::Serialize, serde::Deserialize)]
pub struct File {
pub path: String,
pub content: Vec<u8>,
}
#[derive(serde::Serialize, serde::Deserialize, PartialEq)]
pub enum SyncStatus {
Conflict,
NoConflict,
ClientEditedServerDeleted,
ClientDeletedServerEdited,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(tag = "action")]
pub enum SyncResponseFile {
Add {
path: String,
status: SyncStatus,
content: Vec<u8>,
},
Update {
path: String,
status: SyncStatus,
content: Vec<u8>,
},
Delete {
path: String,
status: SyncStatus,
content: Vec<u8>,
},
}
#[derive(serde::Serialize, serde::Deserialize)]
pub struct File {
pub path: String,
pub content: Vec<u8>,
}