pub struct TransactionMemory<N>where
N: Network,{ /* private fields */ }Expand description
An in-memory transaction storage.
Trait Implementations§
Source§impl<N> Clone for TransactionMemory<N>
impl<N> Clone for TransactionMemory<N>
Source§fn clone(&self) -> TransactionMemory<N>
fn clone(&self) -> TransactionMemory<N>
Returns a duplicate 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> TransactionStorage<N> for TransactionMemory<N>where
N: Network,
impl<N> TransactionStorage<N> for TransactionMemory<N>where
N: Network,
Source§fn open(
transition_store: TransitionStore<N, <TransactionMemory<N> as TransactionStorage<N>>::TransitionStorage>,
) -> Result<TransactionMemory<N>, Error>
fn open( transition_store: TransitionStore<N, <TransactionMemory<N> as TransactionStorage<N>>::TransitionStorage>, ) -> Result<TransactionMemory<N>, Error>
Initializes the transaction storage.
Source§fn id_map(&self) -> &<TransactionMemory<N> as TransactionStorage<N>>::IDMap
fn id_map(&self) -> &<TransactionMemory<N> as TransactionStorage<N>>::IDMap
Returns the ID map.
Source§fn deployment_store(
&self,
) -> &DeploymentStore<N, <TransactionMemory<N> as TransactionStorage<N>>::DeploymentStorage>
fn deployment_store( &self, ) -> &DeploymentStore<N, <TransactionMemory<N> as TransactionStorage<N>>::DeploymentStorage>
Returns the deployment store.
Source§fn execution_store(
&self,
) -> &ExecutionStore<N, <TransactionMemory<N> as TransactionStorage<N>>::ExecutionStorage>
fn execution_store( &self, ) -> &ExecutionStore<N, <TransactionMemory<N> as TransactionStorage<N>>::ExecutionStorage>
Returns the execution store.
Source§fn fee_store(
&self,
) -> &FeeStore<N, <TransactionMemory<N> as TransactionStorage<N>>::FeeStorage>
fn fee_store( &self, ) -> &FeeStore<N, <TransactionMemory<N> as TransactionStorage<N>>::FeeStorage>
Returns the fee store.
Source§type IDMap = MemoryMap<<N as Network>::TransactionID, TransactionType>
type IDMap = MemoryMap<<N as Network>::TransactionID, TransactionType>
The mapping of
transaction ID to transaction type.Source§type DeploymentStorage = DeploymentMemory<N>
type DeploymentStorage = DeploymentMemory<N>
The deployment storage.
Source§type ExecutionStorage = ExecutionMemory<N>
type ExecutionStorage = ExecutionMemory<N>
The execution storage.
Source§type FeeStorage = FeeMemory<N>
type FeeStorage = FeeMemory<N>
The fee storage.
Source§type TransitionStorage = TransitionMemory<N>
type TransitionStorage = TransitionMemory<N>
The transition storage.
Source§fn transition_store(&self) -> &TransitionStore<N, Self::TransitionStorage>
fn transition_store(&self) -> &TransitionStore<N, Self::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 insert(&self, transaction: &Transaction<N>) -> Result<(), Error>
fn insert(&self, transaction: &Transaction<N>) -> Result<(), Error>
Stores the given
transaction into storage.Source§fn remove(
&self,
transaction_id: &<N as Network>::TransactionID,
) -> Result<(), Error>
fn remove( &self, transaction_id: &<N as Network>::TransactionID, ) -> Result<(), Error>
Removes the transaction for the given
transaction ID.Source§fn find_latest_transaction_id_from_program_id(
&self,
program_id: &ProgramID<N>,
) -> Result<Option<<N as Network>::TransactionID>, Error>
fn find_latest_transaction_id_from_program_id( &self, program_id: &ProgramID<N>, ) -> Result<Option<<N as Network>::TransactionID>, Error>
Returns the latest transaction ID that contains the given
program ID.Source§fn find_transaction_id_from_program_id_and_edition(
&self,
program_id: &ProgramID<N>,
edition: u16,
) -> Result<Option<<N as Network>::TransactionID>, Error>
fn find_transaction_id_from_program_id_and_edition( &self, program_id: &ProgramID<N>, edition: u16, ) -> Result<Option<<N as Network>::TransactionID>, Error>
Returns the transaction ID that contains the given
program ID and edition.Source§fn find_transaction_id_from_transition_id(
&self,
transition_id: &<N as Network>::TransitionID,
) -> Result<Option<<N as Network>::TransactionID>, Error>
fn find_transaction_id_from_transition_id( &self, transition_id: &<N as Network>::TransitionID, ) -> Result<Option<<N as Network>::TransactionID>, Error>
Returns the transaction ID that contains the given
transition ID.Source§fn get_transaction(
&self,
transaction_id: &<N as Network>::TransactionID,
) -> Result<Option<Transaction<N>>, Error>
fn get_transaction( &self, transaction_id: &<N as Network>::TransactionID, ) -> Result<Option<Transaction<N>>, Error>
Returns the transaction for the given
transaction ID.Auto Trait Implementations§
impl<N> Freeze for TransactionMemory<N>
impl<N> !RefUnwindSafe for TransactionMemory<N>
impl<N> Send for TransactionMemory<N>
impl<N> Sync for TransactionMemory<N>
impl<N> Unpin for TransactionMemory<N>where
N: Unpin,
impl<N> UnsafeUnpin for TransactionMemory<N>
impl<N> !UnwindSafe for TransactionMemory<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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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