Create the reverse edge modification. This creates an edge that undoes this modification: - Swaps `previous` and `flag` - Uses the given `introduced_by` for the reverse This is used when computing the inverse of a change.
(&self, introduced_by: H)
| 415 | /// |
| 416 | /// This is used when computing the inverse of a change. |
| 417 | pub fn reverse(&self, introduced_by: H) -> Self { |
| 418 | NewEdge { |
| 419 | previous: self.flag, |
| 420 | flag: self.previous, |
| 421 | from: self.from.clone(), |
| 422 | to: self.to.clone(), |
| 423 | introduced_by, |
| 424 | } |
| 425 | } |
| 426 | |
| 427 | /// Convert to use `Option<H>` for change references. |
| 428 | pub fn to_option(&self) -> NewEdge<Option<H>> { |