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

Method open_existing

atomic-identity/src/store.rs:375–382  ·  view source on GitHub ↗

Load an existing store's configuration without initializing it. This does not load any private keys; callers may load public identities.

(root: &Path)

Source from the content-addressed store, hash-verified

373 /// Load an existing store's configuration without initializing it.
374 /// This does not load any private keys; callers may load public identities.
375 pub fn open_existing(root: &Path) -> Result<Self, IdentityError> {
376 let content = fs::read_to_string(root.join(Self::CONFIG_FILE))?;
377 let config = toml::from_str(&content)?;
378 Ok(Self {
379 root: root.to_path_buf(),
380 config,
381 })
382 }
383
384 /// Open or create the default identity store.
385 ///

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected