pub enum MutationEvent {
NodeInserted {
label: String,
key: String,
},
PropSet {
key: String,
field: String,
},
PropRemoved {
key: String,
field: String,
},
EdgeInserted {
edge_type: String,
src: String,
dst: String,
},
EdgeDeleted {
edge_type: String,
src: String,
dst: String,
},
NodeDeleted {
key: String,
},
RuleCreated {
name: String,
},
RuleDeleted {
name: String,
},
RuleRebuilt {
name: String,
},
BatchApplied {
ops: usize,
},
Ingested {
label: String,
inserted: usize,
},
}Expand description
A post-commit mutation notification.
Emitted from log_then_apply after the WAL append, fsync, and
in-memory apply all succeed. Never emitted for rejected operations
(validation errors, GraphError::RuleOwned, duplicate keys, no-op
deletes/removes). Event payloads carry user keys and rule names, never
internal ids.
Replay: GraphDb::open / GraphDb::open_with replay the WAL via
apply only. Emission lives exclusively in log_then_apply, so
recovery is silent even if a sink were installed (it cannot be: the
sink is in-memory and set after open).
Ordering: a Batch WAL frame emits one event per inner record, then
MutationEvent::BatchApplied. An ingest commit emits those same inner
events, then MutationEvent::Ingested (not BatchApplied). An empty
or all-noop batch writes no WAL and emits nothing (including no summary).
Derived edges: rule-created or retracted edges are not individually evented — they are recoverable from the triggering mutation plus the live rule set. Only the triggering record is emitted.
Wire form: externally tagged snake_case JSON
({"node_inserted":{"label":"A","key":"k"}}).
Variants§
NodeInserted
PropSet
PropRemoved
EdgeInserted
EdgeDeleted
NodeDeleted
RuleCreated
RuleDeleted
RuleRebuilt
BatchApplied
Ingested
Trait Implementations§
Source§impl Clone for MutationEvent
impl Clone for MutationEvent
Source§fn clone(&self) -> MutationEvent
fn clone(&self) -> MutationEvent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MutationEvent
impl Debug for MutationEvent
impl Eq for MutationEvent
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> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.