Trait TransactableStorage

Source
pub trait TransactableStorage<Height>:
    IterableStore
    + Debug
    + Send
    + Sync {
    // Required methods
    fn commit_changes(
        &self,
        height: Option<Height>,
        changes: Changes,
    ) -> StorageResult<()>;
    fn view_at_height(
        &self,
        height: &Height,
    ) -> StorageResult<KeyValueView<Self::Column>>;
    fn latest_view(&self) -> StorageResult<IterableKeyValueView<Self::Column>>;
    fn rollback_block_to(&self, height: &Height) -> StorageResult<()>;
}

Required Methods§

Source

fn commit_changes( &self, height: Option<Height>, changes: Changes, ) -> StorageResult<()>

Commits the changes into the storage.

Source

fn view_at_height( &self, height: &Height, ) -> StorageResult<KeyValueView<Self::Column>>

Source

fn latest_view(&self) -> StorageResult<IterableKeyValueView<Self::Column>>

Source

fn rollback_block_to(&self, height: &Height) -> StorageResult<()>

Implementors§

Source§

impl<Description> TransactableStorage<<Description as DatabaseDescription>::Height> for HistoricalRocksDB<Description>
where Description: DatabaseDescription,

Source§

impl<Description> TransactableStorage<<Description as DatabaseDescription>::Height> for MemoryStore<Description>
where Description: DatabaseDescription,