| 56 | /// as stored. |
| 57 | #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] |
| 58 | pub struct GraphSlice { |
| 59 | /// EXTERNAL / INTERNAL / NODE_TYPES: `(id, hash, node type)`. |
| 60 | pub ids: Vec<IdRow>, |
| 61 | /// TREE: `path → inode`. |
| 62 | pub tree: Vec<(String, u64)>, |
| 63 | /// REV_TREE: `inode → path`. |
| 64 | pub rev_tree: Vec<(u64, String)>, |
| 65 | /// INODES (REV_INODES is its inverse): `inode → position`. |
| 66 | pub inodes: Vec<(u64, [u8; 16])>, |
| 67 | /// DIRECTORIES: `inode → flags`. |
| 68 | pub directories: Vec<(u64, u8)>, |
| 69 | /// GRAPH: `vertex → edges`. |
| 70 | pub graph: Vec<([u8; 24], Vec<[u8; 24]>)>, |
| 71 | /// INODE_GRAPH: `(inode, vertex) → edges`. |
| 72 | pub inode_graph: Vec<([u8; 32], Vec<[u8; 24]>)>, |
| 73 | pub crdt: CrdtRows, |
| 74 | /// CONFLICTS for the view: `inode → serialized conflicts`. Keyed by inode |
| 75 | /// alone; the view id is the importer's. |
| 76 | pub conflicts: Vec<(u64, Vec<u8>)>, |
| 77 | } |
| 78 | |
| 79 | /// A file's CRDT rows (see `crdt::tables`). |
| 80 | #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] |