pub struct FileSyncCheckpointStore { /* private fields */ }Expand description
File-backed checkpoint store (line-based peer=sequence,hash).
Implementations§
Trait Implementations§
Source§impl Clone for FileSyncCheckpointStore
impl Clone for FileSyncCheckpointStore
Source§fn clone(&self) -> FileSyncCheckpointStore
fn clone(&self) -> FileSyncCheckpointStore
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FileSyncCheckpointStore
impl Debug for FileSyncCheckpointStore
Source§impl SyncCheckpointStore for FileSyncCheckpointStore
impl SyncCheckpointStore for FileSyncCheckpointStore
Source§fn get_checkpoint(&self, peer_id: &str) -> SyncResult<Option<(u64, String)>>
fn get_checkpoint(&self, peer_id: &str) -> SyncResult<Option<(u64, String)>>
Returns the last accepted sequence and batch hash for
peer_id.Source§fn set_checkpoint(
&self,
peer_id: &str,
sequence: u64,
hash: &str,
) -> SyncResult<()>
fn set_checkpoint( &self, peer_id: &str, sequence: u64, hash: &str, ) -> SyncResult<()>
Atomically replaces the sequence and batch hash for
peer_id.Source§fn get_last_sequence(&self, peer_id: &str) -> SyncResult<u64>
fn get_last_sequence(&self, peer_id: &str) -> SyncResult<u64>
Returns the last accepted sequence, or zero when no checkpoint exists.
Source§fn set_last_sequence(&self, peer_id: &str, sequence: u64) -> SyncResult<()>
fn set_last_sequence(&self, peer_id: &str, sequence: u64) -> SyncResult<()>
Updates only the accepted sequence while preserving the stored hash.
Auto Trait Implementations§
impl !RefUnwindSafe for FileSyncCheckpointStore
impl !UnwindSafe for FileSyncCheckpointStore
impl Freeze for FileSyncCheckpointStore
impl Send for FileSyncCheckpointStore
impl Sync for FileSyncCheckpointStore
impl Unpin for FileSyncCheckpointStore
impl UnsafeUnpin for FileSyncCheckpointStore
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