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

Method save_change

atomic-repository/src/redb_change_store/mod.rs:389–395  ·  view source on GitHub ↗

Store a `Change` object into the redb store. This serializes the change to V3 format, then imports the sections into the redb tables. This is the primary write path during recording. # Returns The blake3 content hash of the stored change.

(&self, change: &Change)

Source from the content-addressed store, hash-verified

387 ///
388 /// The blake3 content hash of the stored change.
389 pub fn save_change(&self, change: &Change) -> RedbStoreResult<[u8; 32]> {
390 let mut buffer = Vec::new();
391 change
392 .serialize(&mut buffer)
393 .map_err(|e| RedbStoreError::Serialization(e.to_string()))?;
394 self.import_v3_bytes(&buffer)
395 }
396
397 // ── Read Operations ────────────────────────────────────────────
398

Calls 2

import_v3_bytesMethod · 0.80
serializeMethod · 0.45