Convert an `Atom >` to a [`CompactAtom`].
(&self, atom: &Atom<Option<Hash>>)
| 147 | |
| 148 | /// Convert an `Atom<Option<Hash>>` to a [`CompactAtom`]. |
| 149 | pub fn compact_atom(&self, atom: &Atom<Option<Hash>>) -> FormatResult<CompactAtom> { |
| 150 | match atom { |
| 151 | Atom::Insertion(v) => Ok(CompactAtom::Insertion(self.compact_insertion(v)?)), |
| 152 | Atom::EdgeUpdate(em) => Ok(CompactAtom::EdgeUpdate(self.compact_edge_update(em)?)), |
| 153 | } |
| 154 | } |
| 155 | |
| 156 | // ── Expand: Compact → Full ───────────────────────────────────── |
| 157 |