pub trait MetadataStore {
// Required methods
fn get(&self, path: &str) -> Option<&String>;
fn set(&mut self, path: &str, metadata: String);
// Provided method
fn remove(&mut self, path: &str) -> Option<String> { ... }
}Expand description
Trait defining a simple key‑value metadata store.
What: Provides read, write and removal operations for associating a string of metadata with a file‑system path.
How: The trait abstracts over concrete storage implementations –
currently an in‑memory HashMap – allowing callers to depend on the trait
rather than a specific type.
Why: CHORUS needs a lightweight way to attach auxiliary information to files without persisting to a database; the trait makes it easy to swap in a persistent backend later if required.