pub struct SyncState {
pub local_head: u64,
pub remote_head: u64,
pub last_push: Option<DateTime<Utc>>,
pub last_pull: Option<DateTime<Utc>>,
pub pending_count: usize,
}Expand description
Tracks the synchronization state between local and remote stores.
This mirrors the JS _ves_sync_state table, keeping track of
local/remote heads, push/pull timestamps, and pending event count.
§Examples
use stateset_sync::SyncState;
let state = SyncState::default();
assert_eq!(state.local_head, 0);
assert_eq!(state.remote_head, 0);
assert_eq!(state.pending_count, 0);Fields§
§local_head: u64The local head sequence number (last locally recorded event).
remote_head: u64The remote head sequence number (last known remote sequence).
last_push: Option<DateTime<Utc>>Timestamp of the last successful push, if any.
last_pull: Option<DateTime<Utc>>Timestamp of the last successful pull, if any.
pending_count: usizeNumber of events pending push.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SyncState
impl<'de> Deserialize<'de> for SyncState
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 SyncState
impl StructuralPartialEq for SyncState
Auto Trait Implementations§
impl Freeze for SyncState
impl RefUnwindSafe for SyncState
impl Send for SyncState
impl Sync for SyncState
impl Unpin for SyncState
impl UnsafeUnpin for SyncState
impl UnwindSafe for SyncState
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