pub trait RunStore:
Debug
+ Send
+ Sync {
// Required methods
fn ledgers(&self) -> Vec<StoredLedger>;
fn write_ledger(&self, key: &str, text: &str) -> Result<(), Error>;
fn remove_ledger(&self, key: &str) -> Result<(), Error>;
fn read_history(&self, vm_id: &str) -> Result<String, Error>;
fn append_history(&self, vm_id: &str, line: &str) -> Result<(), Error>;
}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<(), Error>
fn write_ledger(&self, key: &str, text: &str) -> Result<(), Error>
Replaces a ledger while keeping history separate.
Sourcefn remove_ledger(&self, key: &str) -> Result<(), Error>
fn remove_ledger(&self, key: &str) -> Result<(), Error>
Removes a ledger. The caller has decided whether its resources are resolved.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".