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
.