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

Class AssemblyContext

atomic-core/src/record/workflow/assembly/mod.rs:110–128  ·  view source on GitHub ↗

Context for change assembly. Accumulates hunks, content, and dependencies during the assembly process. # Example ```rust,ignore use atomic_core::record::workflow::assembly::AssemblyContext; use atomic_core::change::ChangeHeader; let mut ctx = AssemblyContext::new(header); // Add hunks from globalized files for file in globalized_files { for graph_op in file.hunks() { ctx.add_hunk(graph_op.clo

Source from the content-addressed store, hash-verified

108/// let change = ctx.finalize(content)?;
109/// ```
110pub struct AssemblyContext {
111 /// The change header.
112 header: ChangeHeader,
113
114 /// Accumulated hunks (graph operations).
115 hunks: Vec<GraphOp<Option<Hash>>>,
116
117 /// Accumulated file operations (semantic layer).
118 file_ops: Vec<FileOps>,
119
120 /// Accumulated dependencies.
121 dependencies: HashSet<Hash>,
122
123 /// Extra known changes (not dependencies but referenced).
124 extra_known: HashSet<Hash>,
125
126 /// Statistics about the assembly.
127 stats: AssemblyStats,
128}
129
130impl AssemblyContext {
131 /// Create a new assembly context.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected