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

Method old_content

atomic-core/src/crdt/branch.rs:408–414  ·  view source on GitHub ↗

Returns the old content for a Delete or Modify operation. For Delete, this is the content at deletion time. For Modify, this is the content before the change. Returns `None` for Insert and Restore.

(&self)

Source from the content-addressed store, hash-verified

406 /// For Modify, this is the content before the change.
407 /// Returns `None` for Insert and Restore.
408 pub fn old_content(&self) -> Option<&[LeafOp]> {
409 match self {
410 BranchOp::Delete { content, .. } => Some(content),
411 BranchOp::Modify { old_content, .. } => Some(old_content),
412 _ => None,
413 }
414 }
415
416 /// Returns the new content for an Insert or Modify operation.
417 ///

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected