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

Class Insertion

atomic-core/src/change/atom.rs:184–213  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

182/// files or locations.
183#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
184pub struct Insertion<H> {
185 /// Vertices that should come before this new content.
186 ///
187 /// During application, edges are created FROM each predecessors
188 /// TO the new span.
189 pub predecessors: Vec<Position<H>>,
190
191 /// Vertices that should come after this new content.
192 ///
193 /// During application, edges are created FROM the new span
194 /// TO each successors.
195 pub successors: Vec<Position<H>>,
196
197 /// Flags for the new edges.
198 ///
199 /// Typically `EdgeFlags::BLOCK` for file content, or
200 /// `EdgeFlags::FOLDER` for directory structure.
201 pub flag: EdgeFlags,
202
203 /// Start offset in the change's content blob (inclusive).
204 pub start: ChangePosition,
205
206 /// End offset in the change's content blob (exclusive).
207 pub end: ChangePosition,
208
209 /// The file (inode) this span belongs to.
210 ///
211 /// This allows efficient lookup of which file a span is part of.
212 pub inode: Position<H>,
213}
214
215impl<H> Insertion<H> {
216 /// Get the length of the content in bytes.

Callers 15

build_graph_first_changeFunction · 0.85
test_edit_hunkFunction · 0.85
globalize_recorded_fileFunction · 0.85
globalize_insertFunction · 0.85
globalize_replaceFunction · 0.85
nextMethod · 0.85
test_editFunction · 0.85
test_edit_displayFunction · 0.85
test_atom_count_editFunction · 0.85
test_edit_json_roundtripFunction · 0.85
test_module_exportsFunction · 0.85

Calls

no outgoing calls

Tested by 15

test_edit_hunkFunction · 0.68
test_editFunction · 0.68
test_edit_displayFunction · 0.68
test_atom_count_editFunction · 0.68
test_edit_json_roundtripFunction · 0.68
test_module_exportsFunction · 0.68
test_change_add_hunkFunction · 0.68
test_multiple_hunksFunction · 0.68
test_atom_is_new_vertexFunction · 0.68
test_atom_as_new_vertexFunction · 0.68