Struct sov_state::StateCheckpoint
source · pub struct StateCheckpoint<S: Storage> { /* private fields */ }Expand description
This structure is responsible for storing the read-write set
and is obtained from the WorkingSet by using either the commit or revert method.
Implementations§
source§impl<S: Storage> StateCheckpoint<S>
impl<S: Storage> StateCheckpoint<S>
pub fn new(inner: S) -> Self
pub fn get(&mut self, key: &StorageKey) -> Option<StorageValue>
pub fn with_witness(inner: S, witness: S::Witness) -> Self
pub fn to_revertable(self) -> WorkingSet<S>
pub fn freeze(&mut self) -> (OrderedReadsAndWrites, S::Witness)
pub fn freeze_non_provable(&mut self) -> OrderedReadsAndWrites
Auto Trait Implementations§
impl<S> RefUnwindSafe for StateCheckpoint<S>where S: RefUnwindSafe, <S as Storage>::Witness: RefUnwindSafe,
impl<S> Send for StateCheckpoint<S>where S: Send, <S as Storage>::Witness: Send,
impl<S> Sync for StateCheckpoint<S>where S: Sync, <S as Storage>::Witness: Sync,
impl<S> Unpin for StateCheckpoint<S>where S: Unpin, <S as Storage>::Witness: Unpin,
impl<S> UnwindSafe for StateCheckpoint<S>where S: UnwindSafe, <S as Storage>::Witness: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more