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

Method insert

atomic-core/src/record/workflow/crdt/builder/branch.rs:52–63  ·  view source on GitHub ↗

Creates a line insert operation with leaf operations.

(branch_id: BranchId, after: Option<BranchId>, leaf_ops: Vec<LeafOp>)

Source from the content-addressed store, hash-verified

50
51 /// Creates a line insert operation with leaf operations.
52 pub fn insert(branch_id: BranchId, after: Option<BranchId>, leaf_ops: Vec<LeafOp>) -> Self {
53 Self {
54 branch_id,
55 operation: BranchOp::Insert {
56 after,
57 content: leaf_ops,
58 },
59 token_ops: Vec::new(),
60 old_line_num: None,
61 new_line_num: None,
62 }
63 }
64
65 /// Creates a line delete operation with original content.
66 ///

Callers 4

add_lineMethod · 0.45
add_line_with_contentMethod · 0.45
add_fileMethod · 0.45
add_file_with_contentMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected