pub struct ConsensusMemory<N: Network> { /* private fields */ }
Expand description
An in-memory consensus storage.
Trait Implementations§
Source§impl<N: Clone + Network> Clone for ConsensusMemory<N>
impl<N: Clone + Network> Clone for ConsensusMemory<N>
Source§fn clone(&self) -> ConsensusMemory<N>
fn clone(&self) -> ConsensusMemory<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> ConsensusStorage<N> for ConsensusMemory<N>
impl<N: Network> ConsensusStorage<N> for ConsensusMemory<N>
Source§fn open<S: Clone + Into<StorageMode>>(storage: S) -> Result<Self>
fn open<S: Clone + Into<StorageMode>>(storage: S) -> Result<Self>
Initializes the consensus storage.
Source§fn finalize_store(&self) -> &FinalizeStore<N, Self::FinalizeStorage>
fn finalize_store(&self) -> &FinalizeStore<N, Self::FinalizeStorage>
Returns the finalize store.
Source§fn block_store(&self) -> &BlockStore<N, Self::BlockStorage>
fn block_store(&self) -> &BlockStore<N, Self::BlockStorage>
Returns the block store.
Source§type FinalizeStorage = FinalizeMemory<N>
type FinalizeStorage = FinalizeMemory<N>
The finalize storage.
Source§type BlockStorage = BlockMemory<N>
type BlockStorage = BlockMemory<N>
The block storage.
Source§type TransactionStorage = TransactionMemory<N>
type TransactionStorage = TransactionMemory<N>
The transaction storage.
Source§type TransitionStorage = TransitionMemory<N>
type TransitionStorage = TransitionMemory<N>
The transition storage.
Source§fn transaction_store(&self) -> &TransactionStore<N, Self::TransactionStorage>
fn transaction_store(&self) -> &TransactionStore<N, Self::TransactionStorage>
Returns the transaction store.
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 finish_atomic(&self) -> Result<()>
fn finish_atomic(&self) -> Result<()>
Finishes an atomic batch write operation.
Auto Trait Implementations§
impl<N> Freeze for ConsensusMemory<N>
impl<N> !RefUnwindSafe for ConsensusMemory<N>
impl<N> Send for ConsensusMemory<N>
impl<N> Sync for ConsensusMemory<N>
impl<N> Unpin for ConsensusMemory<N>where
N: Unpin,
impl<N> !UnwindSafe for ConsensusMemory<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