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

Method leaf_id

atomic-core/src/crdt/leaf.rs:356–363  ·  view source on GitHub ↗

Returns the leaf ID this operation affects, if any. Returns `None` for `Insert` since the ID is assigned later.

(&self)

Source from the content-addressed store, hash-verified

354 ///
355 /// Returns `None` for `Insert` since the ID is assigned later.
356 pub fn leaf_id(&self) -> Option<LeafId> {
357 match self {
358 LeafOp::Insert { .. } => None,
359 LeafOp::Delete { leaf } => Some(*leaf),
360 LeafOp::Replace { leaf, .. } => Some(*leaf),
361 LeafOp::Restore { leaf } => Some(*leaf),
362 }
363 }
364
365 /// Returns `true` if this is an insert operation.
366 #[inline]

Callers 1

leaf_op_idFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected