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

Method init_vault

atomic-core/src/pristine/txn/write/vault.rs:151–166  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

149 }
150
151 fn init_vault(&mut self) -> PristineResult<()> {
152 // Opening tables with a WriteTransaction creates them if they don't exist
153 let _ = self.txn.open_table(VAULT_ENTRIES)?;
154 let _ = self.txn.open_table(VAULT_MANIFEST)?;
155
156 // Store a default manifest if none exists yet
157 let table = self.txn.open_table(VAULT_MANIFEST)?;
158 let needs_default = table.get("manifest")?.is_none();
159 drop(table);
160
161 if needs_default {
162 self.put_vault_manifest(&VaultManifest::default())?;
163 }
164
165 Ok(())
166 }
167}
168
169#[cfg(test)]

Callers 15

runMethod · 0.45
runMethod · 0.45
repo_with_intentFunction · 0.45
repo_with_intentsFunction · 0.45
repo_with_memoryFunction · 0.45
repoFunction · 0.45
test_vault_entry_crudFunction · 0.45

Calls 3

is_noneMethod · 0.80
put_vault_manifestMethod · 0.80
getMethod · 0.65