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

Method trunk_id

atomic-core/src/crdt/trunk.rs:328–335  ·  view source on GitHub ↗

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

(&self)

Source from the content-addressed store, hash-verified

326 ///
327 /// Returns `None` for `Create` since the ID is assigned later.
328 pub fn trunk_id(&self) -> Option<TrunkId> {
329 match self {
330 TrunkOp::Create { .. } => None,
331 TrunkOp::Delete { trunk } => Some(*trunk),
332 TrunkOp::Move { trunk, .. } => Some(*trunk),
333 TrunkOp::Undelete { trunk } => Some(*trunk),
334 }
335 }
336
337 /// Returns `true` if this is a create operation.
338 #[inline]

Callers 8

anchor_to_graphFunction · 0.45
apply_file_ops_batchedFunction · 0.45
apply_single_file_opsFunction · 0.45
test_multi_file_workflowFunction · 0.45
crdt_trunk_existsFunction · 0.45
seed_materialized_fileFunction · 0.45

Calls

no outgoing calls

Tested by 2

test_multi_file_workflowFunction · 0.36