fuel_core::state

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,