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

Method take_builder

atomic-core/src/record/context.rs:554–556  ·  view source on GitHub ↗

Take the builder, replacing it with a new empty builder. This allows continuing to use the context after extracting recorded changes. # Returns The record builder with accumulated changes. # Example ```rust,ignore let mut ctx = RecordContext::new(&txn, &view, &working_copy, &changes); // ... record first batch ... let first_batch = ctx.take_builder(); // ... record second batch ... let second

(&mut self)

Source from the content-addressed store, hash-verified

552 /// let second_batch = ctx.take_builder();
553 /// ```
554 pub fn take_builder(&mut self) -> RecordBuilder {
555 std::mem::take(&mut self.builder)
556 }
557}
558
559// RECORD ITEM - Internal tracking structure

Callers 1

Calls

no outgoing calls

Tested by 1