use super::*; pub type Vec = Vec; pub trait Store: Sync + Send + Sized { fn put(&self, key: &Hash256, item: &impl StoreItem) -> Result<(), Error> { item.db_put(self, key) } fn get(&self, key: &Hash256) -> Result, Error> { I::db_get(self, key) } fn exists(&self, key: &Hash256) -> Result { I::db_exists(self, key) } fn delete(&self, key: &Hash256) -> Result<(), Error> { I::db_delete(self, key) } fn get_block_at_preceeding_slot( &self, start_block_root: Hash256, slot: Slot, ) -> Result, Error> { block_at_slot::get_block_at_preceeding_slot(self, slot, start_block_root) } fn get_bytes(&self, col: &str, key: &[u8]) -> Result>, Error>; fn put_bytes(&self, col: &str, key: &[u8], val: &[u8]) -> Result<(), Error>; fn key_exists(&self, col: &str, key: &[u8]) -> Result; fn key_delete(&self, col: &str, key: &[u8]) -> Result<(), Error>; }