pub enum MutationEvent {
CreateNode {
id: NodeId,
labels: Vec<String>,
properties: Properties,
},
CreateRelationship {
id: RelationshipId,
src: NodeId,
dst: NodeId,
rel_type: String,
properties: Properties,
},
SetNodeProperty {
node_id: NodeId,
key: String,
value: PropertyValue,
},
RemoveNodeProperty {
node_id: NodeId,
key: String,
},
AddNodeLabel {
node_id: NodeId,
label: String,
},
RemoveNodeLabel {
node_id: NodeId,
label: String,
},
SetRelationshipProperty {
rel_id: RelationshipId,
key: String,
value: PropertyValue,
},
RemoveRelationshipProperty {
rel_id: RelationshipId,
key: String,
},
DeleteRelationship {
rel_id: RelationshipId,
},
DeleteNode {
node_id: NodeId,
},
DetachDeleteNode {
node_id: NodeId,
},
Clear,
}Expand description
A durable, replayable mutation against a graph store.
Each variant mirrors a method on GraphStorageMut. Applying every event
in order against a store initialised from the snapshot whose wal_lsn
immediately precedes the first event reproduces the committed state.
The enum derives Serialize/Deserialize so a WAL implementation can
bincode-append events straight to disk without a second serialization
layer.
Variants§
CreateNode
Fields
§
id: NodeIdId the backend allocated for the new node. Captured so replay
against a clean store produces the same id assignment as the
original (next_node_id advances deterministically).
§
properties: PropertiesCreateRelationship
SetNodeProperty
RemoveNodeProperty
AddNodeLabel
RemoveNodeLabel
SetRelationshipProperty
RemoveRelationshipProperty
DeleteRelationship
Fields
§
rel_id: RelationshipIdDeleteNode
DetachDeleteNode
Clear
Trait Implementations§
Source§impl Clone for MutationEvent
impl Clone for MutationEvent
Source§fn clone(&self) -> MutationEvent
fn clone(&self) -> MutationEvent
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 MutationEvent
impl Debug for MutationEvent
Source§impl<'de> Deserialize<'de> for MutationEvent
impl<'de> Deserialize<'de> for MutationEvent
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
Source§impl PartialEq for MutationEvent
impl PartialEq for MutationEvent
Source§impl Serialize for MutationEvent
impl Serialize for MutationEvent
impl StructuralPartialEq for MutationEvent
Auto Trait Implementations§
impl Freeze for MutationEvent
impl RefUnwindSafe for MutationEvent
impl Send for MutationEvent
impl Sync for MutationEvent
impl Unpin for MutationEvent
impl UnsafeUnpin for MutationEvent
impl UnwindSafe for MutationEvent
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