Returns the leaf operations (new content for Insert/Modify, old content for Delete). Returns an empty slice for Restore operations.
(&self)
| 911 | /// |
| 912 | /// Returns an empty slice for Restore operations. |
| 913 | pub fn leaf_ops(&self) -> &[LeafOp] { |
| 914 | match &self.operation { |
| 915 | BranchOp::Insert { content, .. } => content, |
| 916 | BranchOp::Delete { content, .. } => content, |
| 917 | BranchOp::Modify { new_content, .. } => new_content, |
| 918 | BranchOp::Restore { .. } => &[], |
| 919 | BranchOp::Reparent { .. } => &[], |
| 920 | } |
| 921 | } |
| 922 | |
| 923 | /// Returns the number of leaf operations. |
| 924 | pub fn leaf_op_count(&self) -> usize { |
no outgoing calls
no test coverage detected