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

Method get_vault_manifest

atomic-core/src/pristine/txn/read.rs:740–759  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

738 }
739
740 fn get_vault_manifest(&self) -> PristineResult<VaultManifest> {
741 let table = match self.txn.open_table(VAULT_MANIFEST) {
742 Ok(table) => table,
743 Err(redb::TableError::TableDoesNotExist(_)) => return Ok(VaultManifest::default()),
744 Err(e) => return Err(PristineError::from(e)),
745 };
746
747 let result = match table.get("manifest")? {
748 Some(guard) => {
749 let bytes = guard.value();
750 let manifest: VaultManifest =
751 serde_json::from_slice(bytes).map_err(|e| PristineError::Serialization {
752 message: format!("failed to deserialize VaultManifest: {}", e),
753 })?;
754 Ok(manifest)
755 }
756 None => Ok(VaultManifest::default()),
757 };
758 result
759 }
760
761 fn has_vault(&self) -> PristineResult<bool> {
762 let table = match self.txn.open_table(VAULT_MANIFEST) {

Callers 12

vault_goal_startMethod · 0.45
vault_goal_stopMethod · 0.45
vault_goal_resumeMethod · 0.45
vault_intent_createMethod · 0.45
vault_intent_deleteMethod · 0.45
vault_intent_updateMethod · 0.45
vault_intent_linkMethod · 0.45
vault_storeMethod · 0.45
vault_store_entryMethod · 0.45
vault_deleteMethod · 0.45
vault_manifestMethod · 0.45

Calls 1

getMethod · 0.65

Tested by

no test coverage detected