Trait fuel_core_storage::transactional::AtomicView
source · pub trait AtomicView: Send + Sync {
type View;
type Height;
// Required methods
fn latest_height(&self) -> Option<Self::Height>;
fn view_at(&self, height: &Self::Height) -> StorageResult<Self::View>;
fn latest_view(&self) -> Self::View;
}
Expand description
Provides a view of the storage at the given height. It guarantees to be atomic, meaning the view is immutable to outside modifications.
Required Associated Types§
Required Methods§
sourcefn latest_height(&self) -> Option<Self::Height>
fn latest_height(&self) -> Option<Self::Height>
Returns the latest block height.
sourcefn view_at(&self, height: &Self::Height) -> StorageResult<Self::View>
fn view_at(&self, height: &Self::Height) -> StorageResult<Self::View>
Returns the view of the storage at the given height
.
sourcefn latest_view(&self) -> Self::View
fn latest_view(&self) -> Self::View
Returns the view of the storage for the latest block height.