Trait oasis_runtime_sdk::storage::NestedStore
source · pub trait NestedStore: Store {
type Inner;
// Required methods
fn commit(self) -> Self::Inner;
fn rollback(self) -> Self::Inner;
fn has_pending_updates(&self) -> bool;
fn pending_update_byte_size(&self) -> usize;
}
Expand description
A key-value store that supports the commit operation.
Required Associated Types§
Required Methods§
sourcefn commit(self) -> Self::Inner
fn commit(self) -> Self::Inner
Commit any changes to the underlying store.
If this method is not called the changes may be discarded by the store.
sourcefn has_pending_updates(&self) -> bool
fn has_pending_updates(&self) -> bool
Whether there are any store updates pending to be committed.
sourcefn pending_update_byte_size(&self) -> usize
fn pending_update_byte_size(&self) -> usize
Size (in bytes) of any pending updates.