Returns the leaf operations (new content for Insert/Modify, old content for Delete). Returns an empty slice for Restore operations.
(&self)
| 926 | /// |
| 927 | /// Returns an empty slice for Restore operations. |
| 928 | pub fn leaf_ops(&self) -> &[LeafOp] { |
| 929 | match &self.operation { |
| 930 | BranchOp::Insert { content, .. } => content, |
| 931 | BranchOp::Delete { content, .. } => content, |
| 932 | BranchOp::Modify { new_content, .. } => new_content, |
| 933 | BranchOp::Restore { .. } => &[], |
| 934 | BranchOp::Reparent { .. } => &[], |
| 935 | } |
| 936 | } |
| 937 | |
| 938 | /// Returns the number of leaf operations. |
| 939 | pub fn leaf_op_count(&self) -> usize { |
no outgoing calls
no test coverage detected