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

Method insert_at

atomic-core/src/change/ops.rs:650–666  ·  view source on GitHub ↗

Creates a line insert operation with line number.

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

Source from the content-addressed store, hash-verified

648
649 /// Creates a line insert operation with line number.
650 pub fn insert_at(
651 branch_id: BranchId,
652 after: Option<BranchId>,
653 leaf_ops: Vec<LeafOp>,
654 new_line_num: usize,
655 ) -> Self {
656 Self {
657 branch_id,
658 operation: BranchOp::Insert {
659 after,
660 content: leaf_ops,
661 },
662 old_line_num: None,
663 new_line_num: Some(new_line_num),
664 content_range: None,
665 }
666 }
667
668 /// Creates a line delete operation.
669 ///

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected