pub trait RunStore:
Debug
+ Send
+ Sync {
// Required methods
fn ledgers(&self) -> Vec<StoredLedger>;
fn write_ledger(&self, key: &str, text: &str) -> Result<()>;
fn remove_ledger(&self, key: &str) -> Result<()>;
fn read_history(&self, vm_id: &str) -> Result<String>;
fn append_history(&self, vm_id: &str, line: &str) -> Result<()>;
}Expand description
Durable storage used by the run ledger and history policies.
Writes report errors here; the policies deliberately swallow them on teardown so housekeeping never replaces a command’s real outcome. Keys are opaque store identifiers.
Required Methods§
Sourcefn ledgers(&self) -> Vec<StoredLedger>
fn ledgers(&self) -> Vec<StoredLedger>
Lists every ledger, including an unreadable document as text: None.
Sourcefn write_ledger(&self, key: &str, text: &str) -> Result<()>
fn write_ledger(&self, key: &str, text: &str) -> Result<()>
Replaces a ledger while keeping history separate.
Sourcefn remove_ledger(&self, key: &str) -> Result<()>
fn remove_ledger(&self, key: &str) -> Result<()>
Removes a ledger. The caller has decided whether its resources are resolved.
Sourcefn read_history(&self, vm_id: &str) -> Result<String>
fn read_history(&self, vm_id: &str) -> Result<String>
Reads the complete history text, preserving line order and malformed lines.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".