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

Method get_session_manifest

atomic-repository/src/repository/changes.rs:352–362  ·  view source on GitHub ↗

Load an immutable session manifest by content hash.

(
        &self,
        hash: &Hash,
    )

Source from the content-addressed store, hash-verified

350
351 /// Load an immutable session manifest by content hash.
352 pub fn get_session_manifest(
353 &self,
354 hash: &Hash,
355 ) -> Result<Option<atomic_core::change::session::SessionManifest>, RepositoryError> {
356 let txn = self
357 .pristine
358 .read_txn()
359 .map_err(|e| RepositoryError::Database(e.to_string()))?;
360 txn.get_session_manifest(hash)
361 .map_err(|e| RepositoryError::Database(e.to_string()))
362 }
363
364 /// Resolve the latest manifest hash for an external session ID.
365 pub fn get_session_head(&self, session_id: &str) -> Result<Option<Hash>, RepositoryError> {

Callers 2

rebuild_session_indexMethod · 0.45

Calls 1

read_txnMethod · 0.80

Tested by

no test coverage detected