INNER CODE UNIT · Rust
holder
jub0t/Concat · src/crates/concat-api/src/lib.rs:134
pub fn holder(&self, path: &str) -> Option<Holder> {
let key = key_of(path);
self.0
.lock()
.unwrap_or_else(|poisoned| poisoned.into_inner())
.get(&key)
.copied()
}
}
/// The dispatcher: the open sessions and the services behind them.
pub struct Api {
dirs: AppDirs,
/// Open projects by canonical folder path.
sessions: BTreeMap<String, Session>,
/// Where this API may write: a created project, an instantiated
/// template, an export or a preview file lands under one of these.
/// Empty means anywhere, for the process's own owner at a terminal.