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

Method put_vault_manifest

atomic-core/src/pristine/txn/write/vault.rs:141–149  ·  view source on GitHub ↗
(&mut self, manifest: &VaultManifest)

Source from the content-addressed store, hash-verified

139 }
140
141 fn put_vault_manifest(&mut self, manifest: &VaultManifest) -> PristineResult<()> {
142 let bytes = serde_json::to_vec(manifest).map_err(|e| PristineError::Serialization {
143 message: format!("failed to serialize VaultManifest: {}", e),
144 })?;
145
146 let mut table = self.txn.open_table(VAULT_MANIFEST)?;
147 table.insert("manifest", bytes.as_slice())?;
148 Ok(())
149 }
150
151 fn init_vault(&mut self) -> PristineResult<()> {
152 // Opening tables with a WriteTransaction creates them if they don't exist

Calls 2

insertMethod · 0.45
as_sliceMethod · 0.45