pub struct GraphSyncPayload {
pub sync_type: SyncType,
pub session_id: String,
pub graph_name: Option<String>,
pub vector_clock: VectorClock,
pub nodes: Vec<SyncedNode>,
pub edges: Vec<SyncedEdge>,
pub tombstones: Vec<Tombstone>,
pub correlation_id: Option<String>,
pub conflict_info: Option<String>,
}Expand description
Main payload for MessageType::GraphSync messages
Fields§
§sync_type: SyncTypeType of sync operation
session_id: StringSession ID for the graph being synced
graph_name: Option<String>Graph name (from graph_metadata)
vector_clock: VectorClockVector clock representing the state of this sync
nodes: Vec<SyncedNode>Nodes to sync (empty for requests)
edges: Vec<SyncedEdge>Edges to sync (empty for requests)
tombstones: Vec<Tombstone>Tombstones for deleted entities
correlation_id: Option<String>Optional correlation ID for request/response matching
conflict_info: Option<String>For Conflict type: description of the conflict
Implementations§
Source§impl GraphSyncPayload
impl GraphSyncPayload
Sourcepub fn request_full(
session_id: String,
graph_name: Option<String>,
requesting_instance: String,
) -> GraphSyncPayload
pub fn request_full( session_id: String, graph_name: Option<String>, requesting_instance: String, ) -> GraphSyncPayload
Create a full sync request
Sourcepub fn request_incremental(
session_id: String,
graph_name: Option<String>,
requesting_instance: String,
since_vector_clock: VectorClock,
) -> GraphSyncPayload
pub fn request_incremental( session_id: String, graph_name: Option<String>, requesting_instance: String, since_vector_clock: VectorClock, ) -> GraphSyncPayload
Create an incremental sync request
Sourcepub fn response_full(
session_id: String,
graph_name: Option<String>,
vector_clock: VectorClock,
nodes: Vec<SyncedNode>,
edges: Vec<SyncedEdge>,
tombstones: Vec<Tombstone>,
correlation_id: Option<String>,
) -> GraphSyncPayload
pub fn response_full( session_id: String, graph_name: Option<String>, vector_clock: VectorClock, nodes: Vec<SyncedNode>, edges: Vec<SyncedEdge>, tombstones: Vec<Tombstone>, correlation_id: Option<String>, ) -> GraphSyncPayload
Create a full sync response
Sourcepub fn response_incremental(
session_id: String,
graph_name: Option<String>,
vector_clock: VectorClock,
nodes: Vec<SyncedNode>,
edges: Vec<SyncedEdge>,
tombstones: Vec<Tombstone>,
correlation_id: Option<String>,
) -> GraphSyncPayload
pub fn response_incremental( session_id: String, graph_name: Option<String>, vector_clock: VectorClock, nodes: Vec<SyncedNode>, edges: Vec<SyncedEdge>, tombstones: Vec<Tombstone>, correlation_id: Option<String>, ) -> GraphSyncPayload
Create an incremental sync response
Sourcepub fn ack(
session_id: String,
graph_name: Option<String>,
vector_clock: VectorClock,
nodes_applied: usize,
edges_applied: usize,
tombstones_applied: usize,
conflicts_detected: usize,
correlation_id: Option<String>,
) -> GraphSyncPayload
pub fn ack( session_id: String, graph_name: Option<String>, vector_clock: VectorClock, nodes_applied: usize, edges_applied: usize, tombstones_applied: usize, conflicts_detected: usize, correlation_id: Option<String>, ) -> GraphSyncPayload
Create an acknowledgment
Sourcepub fn conflict(
session_id: String,
graph_name: Option<String>,
entity_type: String,
entity_id: i64,
local_vector_clock: VectorClock,
remote_vector_clock: VectorClock,
correlation_id: Option<String>,
) -> GraphSyncPayload
pub fn conflict( session_id: String, graph_name: Option<String>, entity_type: String, entity_id: i64, local_vector_clock: VectorClock, remote_vector_clock: VectorClock, correlation_id: Option<String>, ) -> GraphSyncPayload
Create a conflict notification
Trait Implementations§
Source§impl Clone for GraphSyncPayload
impl Clone for GraphSyncPayload
Source§fn clone(&self) -> GraphSyncPayload
fn clone(&self) -> GraphSyncPayload
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 GraphSyncPayload
impl Debug for GraphSyncPayload
Source§impl<'de> Deserialize<'de> for GraphSyncPayload
impl<'de> Deserialize<'de> for GraphSyncPayload
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<GraphSyncPayload, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<GraphSyncPayload, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for GraphSyncPayload
impl Serialize for GraphSyncPayload
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for GraphSyncPayload
impl RefUnwindSafe for GraphSyncPayload
impl Send for GraphSyncPayload
impl Sync for GraphSyncPayload
impl Unpin for GraphSyncPayload
impl UnwindSafe for GraphSyncPayload
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more