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

Method get_session_head

atomic-core/src/pristine/txn/read.rs:679–684  ·  view source on GitHub ↗

Resolve the latest manifest hash for an external session ID.

(&self, session_id: &str)

Source from the content-addressed store, hash-verified

677
678 /// Resolve the latest manifest hash for an external session ID.
679 pub fn get_session_head(&self, session_id: &str) -> PristineResult<Option<crate::types::Hash>> {
680 let table = self.txn.open_table(SESSION_HEADS)?;
681 Ok(table
682 .get(session_id)?
683 .map(|value| crate::types::Hash::from_bytes(*value.value())))
684 }
685
686 /// Read every mutable session head for index rebuilds.
687 pub fn list_session_heads(&self) -> PristineResult<Vec<(String, crate::types::Hash)>> {

Calls 1

getMethod · 0.65