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

Method get_session_head

atomic-core/src/pristine/txn/read.rs:634–639  ·  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

632
633 /// Resolve the latest manifest hash for an external session ID.
634 pub fn get_session_head(&self, session_id: &str) -> PristineResult<Option<crate::types::Hash>> {
635 let table = self.txn.open_table(SESSION_HEADS)?;
636 Ok(table
637 .get(session_id)?
638 .map(|value| crate::types::Hash::from_bytes(*value.value())))
639 }
640
641 /// Read every mutable session head for index rebuilds.
642 pub fn list_session_heads(&self) -> PristineResult<Vec<(String, crate::types::Hash)>> {

Calls 1

getMethod · 0.65