pub struct ExecutionStore<N: Network, E: ExecutionStorage<N>> { /* private fields */ }
Expand description
The execution store.
Implementations§
Source§impl<N: Network, E: ExecutionStorage<N>> ExecutionStore<N, E>
impl<N: Network, E: ExecutionStorage<N>> ExecutionStore<N, E>
Sourcepub fn open(fee_store: FeeStore<N, E::FeeStorage>) -> Result<Self>
pub fn open(fee_store: FeeStore<N, E::FeeStorage>) -> Result<Self>
Initializes the execution store.
Sourcepub fn insert(&self, transaction: &Transaction<N>) -> Result<()>
pub fn insert(&self, transaction: &Transaction<N>) -> Result<()>
Stores the given execution transaction
into storage.
Sourcepub fn remove(&self, transaction_id: &N::TransactionID) -> Result<()>
pub fn remove(&self, transaction_id: &N::TransactionID) -> Result<()>
Removes the transaction for the given transaction ID
.
Sourcepub fn start_atomic(&self)
pub fn start_atomic(&self)
Starts an atomic batch write operation.
Sourcepub fn is_atomic_in_progress(&self) -> bool
pub fn is_atomic_in_progress(&self) -> bool
Checks if an atomic batch is in progress.
Sourcepub fn atomic_checkpoint(&self)
pub fn atomic_checkpoint(&self)
Checkpoints the atomic batch.
Sourcepub fn clear_latest_checkpoint(&self)
pub fn clear_latest_checkpoint(&self)
Clears the latest atomic batch checkpoint.
Sourcepub fn atomic_rewind(&self)
pub fn atomic_rewind(&self)
Rewinds the atomic batch to the previous checkpoint.
Sourcepub fn abort_atomic(&self)
pub fn abort_atomic(&self)
Aborts an atomic batch write operation.
Sourcepub fn finish_atomic(&self) -> Result<()>
pub fn finish_atomic(&self) -> Result<()>
Finishes an atomic batch write operation.
Sourcepub fn storage_mode(&self) -> &StorageMode
pub fn storage_mode(&self) -> &StorageMode
Returns the storage mode.
Source§impl<N: Network, E: ExecutionStorage<N>> ExecutionStore<N, E>
impl<N: Network, E: ExecutionStorage<N>> ExecutionStore<N, E>
Sourcepub fn get_transaction(
&self,
transaction_id: &N::TransactionID,
) -> Result<Option<Transaction<N>>>
pub fn get_transaction( &self, transaction_id: &N::TransactionID, ) -> Result<Option<Transaction<N>>>
Returns the transaction for the given transaction ID
.
Sourcepub fn get_execution(
&self,
transaction_id: &N::TransactionID,
) -> Result<Option<Execution<N>>>
pub fn get_execution( &self, transaction_id: &N::TransactionID, ) -> Result<Option<Execution<N>>>
Returns the execution for the given transaction ID
.
Source§impl<N: Network, E: ExecutionStorage<N>> ExecutionStore<N, E>
impl<N: Network, E: ExecutionStorage<N>> ExecutionStore<N, E>
Sourcepub fn find_transaction_id_from_transition_id(
&self,
transition_id: &N::TransitionID,
) -> Result<Option<N::TransactionID>>
pub fn find_transaction_id_from_transition_id( &self, transition_id: &N::TransitionID, ) -> Result<Option<N::TransactionID>>
Returns the transaction ID that executed the given transition ID
.
Source§impl<N: Network, E: ExecutionStorage<N>> ExecutionStore<N, E>
impl<N: Network, E: ExecutionStorage<N>> ExecutionStore<N, E>
Sourcepub fn execution_transaction_ids(
&self,
) -> impl '_ + Iterator<Item = Cow<'_, N::TransactionID>>
pub fn execution_transaction_ids( &self, ) -> impl '_ + Iterator<Item = Cow<'_, N::TransactionID>>
Returns an iterator over the execution transaction IDs, for all executions.
Trait Implementations§
Source§impl<N: Clone + Network, E: Clone + ExecutionStorage<N>> Clone for ExecutionStore<N, E>
impl<N: Clone + Network, E: Clone + ExecutionStorage<N>> Clone for ExecutionStore<N, E>
Source§fn clone(&self) -> ExecutionStore<N, E>
fn clone(&self) -> ExecutionStore<N, E>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl<N, E> Freeze for ExecutionStore<N, E>where
E: Freeze,
impl<N, E> RefUnwindSafe for ExecutionStore<N, E>where
E: RefUnwindSafe,
N: RefUnwindSafe,
impl<N, E> Send for ExecutionStore<N, E>
impl<N, E> Sync for ExecutionStore<N, E>
impl<N, E> Unpin for ExecutionStore<N, E>
impl<N, E> UnwindSafe for ExecutionStore<N, E>where
E: UnwindSafe,
N: 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more