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§