Convert this atom to use `Option ` for the change references. This is useful when building a change that references itself (using None for self-references).
(&self)
| 141 | /// This is useful when building a change that references itself |
| 142 | /// (using None for self-references). |
| 143 | pub fn to_option(&self) -> Atom<Option<H>> { |
| 144 | match self { |
| 145 | Atom::Insertion(v) => Atom::Insertion(v.to_option()), |
| 146 | Atom::EdgeUpdate(e) => Atom::EdgeUpdate(e.to_option()), |
| 147 | } |
| 148 | } |
| 149 | } |
| 150 | |
| 151 | impl<H> From<Insertion<H>> for Atom<H> { |