Struct diem_vm::data_cache::StateViewCache [−][src]
pub struct StateViewCache<'a, S> { /* fields omitted */ }Expand description
A local cache for a given a StateView. The cache is private to the Diem layer
but can be used as a one shot cache for systems that need a simple RemoteCache
implementation (e.g. tests or benchmarks).
The cache is responsible to track all changes to the StateView that are the result
of transaction execution. Those side effects are published at the end of a transaction
execution via StateViewCache::push_write_set.
StateViewCache is responsible to give an up to date view over the data store,
so that changes executed but not yet committed are visible to subsequent transactions.
If a system wishes to execute a block of transaction on a given view, a cache that keeps track of incremental changes is vital to the consistency of the data store and the system.
Implementations
Trait Implementations
Gets the state for a single access path.
VM needs this method to know whether the current state view is for genesis state creation. Currently TransactionPayload::WriteSet is only valid for genesis state creation. Read more
For logging and debugging purpose, identifies what this view is for.
Auto Trait Implementations
impl<'a, S> RefUnwindSafe for StateViewCache<'a, S> where
S: RefUnwindSafe,
impl<'a, S> Send for StateViewCache<'a, S> where
S: Sync,
impl<'a, S> Sync for StateViewCache<'a, S> where
S: Sync,
impl<'a, S> Unpin for StateViewCache<'a, S>
impl<'a, S> UnwindSafe for StateViewCache<'a, S> where
S: RefUnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more
type Err = E
type Output = T
type Output = T
Should always be Self