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

Method alloc_leaf_id

atomic-core/src/record/workflow/crdt/builder/mod.rs:315–320  ·  view source on GitHub ↗

Allocates a new leaf ID.

(&mut self)

Source from the content-addressed store, hash-verified

313
314 /// Allocates a new leaf ID.
315 pub(crate) fn alloc_leaf_id(&mut self) -> LeafId {
316 let id = LeafId::new(self.change_id, self.next_leaf_idx);
317 self.next_leaf_idx += 1;
318 self.last_leaf_id = Some(id);
319 id
320 }
321
322 /// Appends content to the buffer and returns the byte range.
323 pub(crate) fn append_content(&mut self, data: &[u8]) -> std::ops::Range<usize> {

Callers 3

add_line_with_contentMethod · 0.45
add_tokenMethod · 0.45
add_file_with_contentMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected