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

Method id

atomic-core/src/change/format_v3/semantic/encode.rs:33–49  ·  view source on GitHub ↗
(&mut self, branch: bool, owner: u64, index: u32)

Source from the content-addressed store, hash-verified

31
32impl Encoder<'_> {
33 fn id(&mut self, branch: bool, owner: u64, index: u32) {
34 let (out, o, i) = if branch && self.c.split_ids {
35 (
36 &mut self.c.branches,
37 &mut self.s.branch_owner,
38 &mut self.s.branch_index,
39 )
40 } else {
41 (
42 &mut self.c.leaves,
43 &mut self.s.leaf_owner,
44 &mut self.s.leaf_index,
45 )
46 };
47 o.write(out, owner);
48 i.write(out, index.into());
49 }
50 fn branch(&mut self, id: BranchId) {
51 self.id(true, id.change_id().get(), id.branch_idx());
52 }

Callers 2

branchMethod · 0.45
leavesMethod · 0.45

Calls 1

writeMethod · 0.45

Tested by

no test coverage detected