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

Method get_session_head

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

1125
1126 /// Resolve the latest manifest hash for an external session ID.
1127 pub fn get_session_head(&self, session_id: &str) -> PristineResult<Option<crate::types::Hash>> {
1128 let table = self.txn.open_table(SESSION_HEADS)?;
1129 Ok(table
1130 .get(session_id)?
1131 .map(|value| crate::types::Hash::from_bytes(*value.value())))
1132 }
1133
1134 /// Read every mutable session head for index rebuilds.
1135 pub fn list_session_heads(&self) -> PristineResult<Vec<(String, crate::types::Hash)>> {

Calls 2

valueMethod · 0.80
getMethod · 0.65