pub struct ExecutionMemory<N: Network> { /* private fields */ }
Expand description
An in-memory execution storage.
Trait Implementations§
Source§impl<N: Clone + Network> Clone for ExecutionMemory<N>
impl<N: Clone + Network> Clone for ExecutionMemory<N>
Source§fn clone(&self) -> ExecutionMemory<N>
fn clone(&self) -> ExecutionMemory<N>
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 moreSource§impl<N: Network> ExecutionStorage<N> for ExecutionMemory<N>
impl<N: Network> ExecutionStorage<N> for ExecutionMemory<N>
Source§fn open(fee_store: FeeStore<N, Self::FeeStorage>) -> Result<Self>
fn open(fee_store: FeeStore<N, Self::FeeStorage>) -> Result<Self>
Initializes the execution storage.
Source§fn reverse_id_map(&self) -> &Self::ReverseIDMap
fn reverse_id_map(&self) -> &Self::ReverseIDMap
Returns the reverse ID map.
Source§fn inclusion_map(&self) -> &Self::InclusionMap
fn inclusion_map(&self) -> &Self::InclusionMap
Returns the inclusion map.
Source§fn fee_store(&self) -> &FeeStore<N, Self::FeeStorage>
fn fee_store(&self) -> &FeeStore<N, Self::FeeStorage>
Returns the fee store.
Source§type IDMap = MemoryMap<<N as Network>::TransactionID, (Vec<<N as Network>::TransitionID>, bool)>
type IDMap = MemoryMap<<N as Network>::TransactionID, (Vec<<N as Network>::TransitionID>, bool)>
The mapping of
transaction ID
to ([transition ID], has_fee)
.Source§type ReverseIDMap = MemoryMap<<N as Network>::TransitionID, <N as Network>::TransactionID>
type ReverseIDMap = MemoryMap<<N as Network>::TransitionID, <N as Network>::TransactionID>
The mapping of
transition ID
to transaction ID
.Source§type InclusionMap = MemoryMap<<N as Network>::TransactionID, (<N as Network>::StateRoot, Option<Proof<N>>)>
type InclusionMap = MemoryMap<<N as Network>::TransactionID, (<N as Network>::StateRoot, Option<Proof<N>>)>
The mapping of
transaction ID
to (global state root, (optional) proof)
.Source§type FeeStorage = FeeMemory<N>
type FeeStorage = FeeMemory<N>
The fee storage.
Source§fn transition_store(
&self,
) -> &TransitionStore<N, <Self::FeeStorage as FeeStorage<N>>::TransitionStorage>
fn transition_store( &self, ) -> &TransitionStore<N, <Self::FeeStorage as FeeStorage<N>>::TransitionStorage>
Returns the transition store.
Source§fn storage_mode(&self) -> &StorageMode
fn storage_mode(&self) -> &StorageMode
Returns the storage mode.
Source§fn start_atomic(&self)
fn start_atomic(&self)
Starts an atomic batch write operation.
Source§fn is_atomic_in_progress(&self) -> bool
fn is_atomic_in_progress(&self) -> bool
Checks if an atomic batch is in progress.
Source§fn atomic_checkpoint(&self)
fn atomic_checkpoint(&self)
Checkpoints the atomic batch.
Source§fn clear_latest_checkpoint(&self)
fn clear_latest_checkpoint(&self)
Clears the latest atomic batch checkpoint.
Source§fn atomic_rewind(&self)
fn atomic_rewind(&self)
Rewinds the atomic batch to the previous checkpoint.
Source§fn abort_atomic(&self)
fn abort_atomic(&self)
Aborts an atomic batch write operation.
Source§fn finish_atomic(&self) -> Result<()>
fn finish_atomic(&self) -> Result<()>
Finishes an atomic batch write operation.
Source§fn insert(&self, transaction: &Transaction<N>) -> Result<()>
fn insert(&self, transaction: &Transaction<N>) -> Result<()>
Stores the given
execution transaction
pair into storage.Source§fn remove(&self, transaction_id: &N::TransactionID) -> Result<()>
fn remove(&self, transaction_id: &N::TransactionID) -> Result<()>
Removes the execution transaction for the given
transaction ID
.Source§fn find_transaction_id_from_transition_id(
&self,
transition_id: &N::TransitionID,
) -> Result<Option<N::TransactionID>>
fn find_transaction_id_from_transition_id( &self, transition_id: &N::TransitionID, ) -> Result<Option<N::TransactionID>>
Returns the transaction ID that contains the given
transition ID
.Source§fn get_execution(
&self,
transaction_id: &N::TransactionID,
) -> Result<Option<Execution<N>>>
fn get_execution( &self, transaction_id: &N::TransactionID, ) -> Result<Option<Execution<N>>>
Returns the execution for the given
transaction ID
.Source§fn get_transaction(
&self,
transaction_id: &N::TransactionID,
) -> Result<Option<Transaction<N>>>
fn get_transaction( &self, transaction_id: &N::TransactionID, ) -> Result<Option<Transaction<N>>>
Returns the transaction for the given
transaction ID
.Auto Trait Implementations§
impl<N> Freeze for ExecutionMemory<N>
impl<N> !RefUnwindSafe for ExecutionMemory<N>
impl<N> Send for ExecutionMemory<N>
impl<N> Sync for ExecutionMemory<N>
impl<N> Unpin for ExecutionMemory<N>where
N: Unpin,
impl<N> !UnwindSafe for ExecutionMemory<N>
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