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

Method append_content

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

Appends content to the buffer and returns the byte range.

(&mut self, data: &[u8])

Source from the content-addressed store, hash-verified

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> {
324 let start = self.content.len();
325 self.content.extend_from_slice(data);
326 let end = self.content.len();
327 self.stats.content_bytes += data.len();
328 start..end
329 }
330
331 /// Merges another builder's results into this one.
332 pub fn merge(&mut self, other: CrdtChangeBuilder) {

Callers 5

assemble_changeFunction · 0.45
add_line_with_contentMethod · 0.45
add_tokenMethod · 0.45
replace_tokenMethod · 0.45
add_file_with_contentMethod · 0.45

Calls 1

lenMethod · 0.45

Tested by

no test coverage detected