pub struct InMemorySyncCheckpointStore { /* private fields */ }Expand description
In-memory checkpoint store for tests/local runtime.
Implementations§
Trait Implementations§
Source§impl Clone for InMemorySyncCheckpointStore
impl Clone for InMemorySyncCheckpointStore
Source§fn clone(&self) -> InMemorySyncCheckpointStore
fn clone(&self) -> InMemorySyncCheckpointStore
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 InMemorySyncCheckpointStore
impl Debug for InMemorySyncCheckpointStore
Source§impl Default for InMemorySyncCheckpointStore
impl Default for InMemorySyncCheckpointStore
Source§fn default() -> InMemorySyncCheckpointStore
fn default() -> InMemorySyncCheckpointStore
Returns the “default value” for a type. Read more
Source§impl SyncCheckpointStore for InMemorySyncCheckpointStore
impl SyncCheckpointStore for InMemorySyncCheckpointStore
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 InMemorySyncCheckpointStore
impl !UnwindSafe for InMemorySyncCheckpointStore
impl Freeze for InMemorySyncCheckpointStore
impl Send for InMemorySyncCheckpointStore
impl Sync for InMemorySyncCheckpointStore
impl Unpin for InMemorySyncCheckpointStore
impl UnsafeUnpin for InMemorySyncCheckpointStore
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