Skip to main content

jellyflow_runtime/runtime/events/
store.rs

1use crate::io::NodeGraphViewState;
2use crate::runtime::commit::NodeGraphPatch;
3
4use super::{NodeGraphDocumentSnapshot, ViewChange};
5
6/// Store event emitted to subscribers.
7#[derive(Clone, Copy)]
8pub enum NodeGraphStoreEvent<'a> {
9    DocumentReplaced {
10        before: NodeGraphDocumentSnapshot<'a>,
11        after: NodeGraphDocumentSnapshot<'a>,
12    },
13    GraphCommitted {
14        patch: &'a NodeGraphPatch,
15    },
16    ViewChanged {
17        before: &'a NodeGraphViewState,
18        after: &'a NodeGraphViewState,
19        changes: &'a [ViewChange],
20    },
21}