1#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)]
2pub struct Cell(petgraph::graph::NodeIndex);
3
4impl Cell {
5 pub(crate) fn new(index: petgraph::graph::NodeIndex) -> Self {
6 Self(index)
7 }
8
9 pub(crate) fn index(self) -> petgraph::graph::NodeIndex {
10 self.0
11 }
12}
13
14#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
15pub(crate) struct CellData {
16 pub(crate) computation_id: u32,
17 pub(crate) last_updated_version: u32,
18 pub(crate) last_verified_version: u32,
19}
20
21impl CellData {
22 pub(crate) fn new(computation_id: u32) -> Self {
23 Self {
24 computation_id,
25 last_updated_version: 0,
26 last_verified_version: 0,
27 }
28 }
29}