MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / reverse

Method reverse

atomic-core/src/change/atom.rs:417–425  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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>> {

Callers 11

recordTurnFunction · 0.45
from_serializedMethod · 0.45
diff_tokensFunction · 0.45
compute_word_diffFunction · 0.45
compute_lcsFunction · 0.45
test_new_edge_reverseFunction · 0.45
test_edge_reverseFunction · 0.45
find_unrecord_setFunction · 0.45
insert_change_recMethod · 0.45
reverse_logFunction · 0.45

Calls 1

cloneMethod · 0.45

Tested by 2

test_new_edge_reverseFunction · 0.36
test_edge_reverseFunction · 0.36