pub trait StorageLayer {
// Required methods
fn insert_decision(
&mut self,
payload: &str,
rules: &str,
genesis: bool,
) -> Result<(), String>;
fn insert_decision_batch(
&mut self,
decisions: Vec<(&str, &str)>,
genesis: bool,
) -> Result<(), String>;
fn get_latest_hash(&self) -> Result<String, String>;
fn export_ledger(&self) -> Result<String, String>;
fn list_decisions(&self, limit: u32, offset: u32) -> Result<String, String>;
fn count_decisions(&self) -> Result<u64, String>;
}Required Methods§
fn insert_decision( &mut self, payload: &str, rules: &str, genesis: bool, ) -> Result<(), String>
fn insert_decision_batch( &mut self, decisions: Vec<(&str, &str)>, genesis: bool, ) -> Result<(), String>
fn get_latest_hash(&self) -> Result<String, String>
fn export_ledger(&self) -> Result<String, String>
fn list_decisions(&self, limit: u32, offset: u32) -> Result<String, String>
fn count_decisions(&self) -> Result<u64, String>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl StorageLayer for SqliteStorage
Available on non-WebAssembly only.