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§
sourcetype ViewAtHeight
type ViewAtHeight
The type of the storage view at Self::Height
.
Required Methods§
sourcefn latest_height(&self) -> Option<Self::Height>
fn latest_height(&self) -> Option<Self::Height>
Returns the latest height.
sourcefn view_at(&self, height: &Self::Height) -> StorageResult<Self::ViewAtHeight>
fn view_at(&self, height: &Self::Height) -> StorageResult<Self::ViewAtHeight>
Returns the view of the storage at the given height
.