fuel_core_storage::transactional

Trait HistoricalView

source
pub trait HistoricalView: AtomicView {
    type Height;
    type ViewAtHeight;

    // Required methods
    fn latest_height(&self) -> Option<Self::Height>;
    fn view_at(
        &self,
        height: &Self::Height,
    ) -> StorageResult<Self::ViewAtHeight>;
}
Expand description

Provides an atomic view of the storage at the given height. The view is guaranteed to be unmodifiable for the given height.

Required Associated Types§

source

type Height

The type used by the storage to track the commitments at a specific height.

source

type ViewAtHeight

The type of the storage view at Self::Height.

Required Methods§

source

fn latest_height(&self) -> Option<Self::Height>

Returns the latest height.

source

fn view_at(&self, height: &Self::Height) -> StorageResult<Self::ViewAtHeight>

Returns the view of the storage at the given height.

Implementors§