pub struct StateDb { /* private fields */ }Implementations§
Source§impl StateDb
impl StateDb
pub fn open<P: AsRef<Path>>(path: P) -> Result<Self>
pub fn get_sync_state(&self, link_id: &str) -> Result<Option<SyncState>>
pub fn upsert_sync_state(&self, state: &SyncState) -> Result<()>
pub fn insert_conflict(&self, conflict: &ConflictRecord) -> Result<()>
pub fn list_conflicts(&self, link_id: &str) -> Result<Vec<ConflictRecord>>
pub fn has_conflicts(&self, link_id: &str) -> Result<bool>
pub fn clear_conflicts(&self, link_id: &str) -> Result<()>
pub fn append_log( &self, link_id: &str, action: &str, status: &str, message: Option<&str>, ) -> Result<()>
pub fn list_log( &self, link_id: &str, limit: Option<usize>, ) -> Result<Vec<SyncLogEntry>>
pub fn delete_state(&self, link_id: &str) -> Result<()>
Auto Trait Implementations§
impl !Freeze for StateDb
impl !RefUnwindSafe for StateDb
impl Send for StateDb
impl !Sync for StateDb
impl Unpin for StateDb
impl UnsafeUnpin for StateDb
impl !UnwindSafe for StateDb
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