pub enum SyncPayload {
Hello(PeerInfo),
ClockRequest,
ClockResponse(VectorClock),
DeltaRequest {
since_clock: VectorClock,
},
DeltaResponse {
deltas: DeltaBatch,
has_more: bool,
},
FullState {
state: GA3,
clock: VectorClock,
},
Heartbeat,
Ack {
message_id: u64,
applied_clock: VectorClock,
},
Goodbye,
}Expand description
The payload of a sync message.
Variants§
Hello(PeerInfo)
Announce presence to peers
ClockRequest
Request clock comparison
ClockResponse(VectorClock)
Response with current clock
DeltaRequest
Request deltas since a given clock
Fields
§
since_clock: VectorClockThe clock the requester has
DeltaResponse
Response with deltas
FullState
Full state sync (for new peers or recovery)
Heartbeat
Heartbeat to maintain connection
Ack
Acknowledge receipt of deltas
Goodbye
Goodbye message when leaving
Trait Implementations§
Source§impl Clone for SyncPayload
impl Clone for SyncPayload
Source§fn clone(&self) -> SyncPayload
fn clone(&self) -> SyncPayload
Returns a duplicate of the value. Read more
1.0.0 · 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 SyncPayload
impl Debug for SyncPayload
Source§impl<'de> Deserialize<'de> for SyncPayload
impl<'de> Deserialize<'de> for SyncPayload
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
Auto Trait Implementations§
impl Freeze for SyncPayload
impl RefUnwindSafe for SyncPayload
impl Send for SyncPayload
impl Sync for SyncPayload
impl Unpin for SyncPayload
impl UnsafeUnpin for SyncPayload
impl UnwindSafe for SyncPayload
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