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

Method new_content

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

Returns the new content for an Insert or Modify operation. For Insert, this is the initial content. For Modify, this is the content after the change. Returns `None` for Delete and Restore.

(&self)

Source from the content-addressed store, hash-verified

419 /// For Modify, this is the content after the change.
420 /// Returns `None` for Delete and Restore.
421 pub fn new_content(&self) -> Option<&[LeafOp]> {
422 match self {
423 BranchOp::Insert { content, .. } => Some(content),
424 BranchOp::Modify { new_content, .. } => Some(new_content),
425 _ => None,
426 }
427 }
428
429 /// Returns `true` if this is a delete operation.
430 #[inline]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected