1#[derive(
2 Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord, serde::Serialize, serde::Deserialize,
3)]
4#[serde(transparent)]
5pub struct Cell(u32);
6
7impl Cell {
8 pub(crate) fn new(index: u32) -> Self {
9 Self(index)
10 }
11}
12
13#[derive(Clone, serde::Serialize, serde::Deserialize)]
14pub(crate) struct CellData {
15 pub(crate) computation_id: u32,
16 pub(crate) last_updated_version: u32,
17 pub(crate) last_verified_version: u32,
18 pub(crate) dependencies: Vec<Cell>,
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 dependencies: Vec::new(),
28 }
29 }
30}