pub struct ConsensusStore<N, C>where
N: Network,
C: ConsensusStorage<N>,{ /* private fields */ }
Expand description
The consensus store.
Implementations§
Source§impl<N, C> ConsensusStore<N, C>where
N: Network,
C: ConsensusStorage<N>,
impl<N, C> ConsensusStore<N, C>where
N: Network,
C: ConsensusStorage<N>,
Sourcepub fn open<S>(storage: S) -> Result<ConsensusStore<N, C>, Error>
pub fn open<S>(storage: S) -> Result<ConsensusStore<N, C>, Error>
Initializes the consensus store.
Sourcepub fn from(storage: C) -> ConsensusStore<N, C>
pub fn from(storage: C) -> ConsensusStore<N, C>
Initializes a consensus store from storage.
Sourcepub fn finalize_store(
&self,
) -> &FinalizeStore<N, <C as ConsensusStorage<N>>::FinalizeStorage>
pub fn finalize_store( &self, ) -> &FinalizeStore<N, <C as ConsensusStorage<N>>::FinalizeStorage>
Returns the finalize store.
Sourcepub fn block_store(
&self,
) -> &BlockStore<N, <C as ConsensusStorage<N>>::BlockStorage>
pub fn block_store( &self, ) -> &BlockStore<N, <C as ConsensusStorage<N>>::BlockStorage>
Returns the block store.
Sourcepub fn transaction_store(
&self,
) -> &TransactionStore<N, <C as ConsensusStorage<N>>::TransactionStorage>
pub fn transaction_store( &self, ) -> &TransactionStore<N, <C as ConsensusStorage<N>>::TransactionStorage>
Returns the transaction store.
Sourcepub fn transition_store(
&self,
) -> &TransitionStore<N, <C as ConsensusStorage<N>>::TransitionStorage>
pub fn transition_store( &self, ) -> &TransitionStore<N, <C as ConsensusStorage<N>>::TransitionStorage>
Returns the transition store.
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<(), Error>
pub fn finish_atomic(&self) -> Result<(), Error>
Finishes an atomic batch write operation.
Sourcepub fn storage_mode(&self) -> &StorageMode
pub fn storage_mode(&self) -> &StorageMode
Returns the storage mode.
Trait Implementations§
Source§impl<N, C> Clone for ConsensusStore<N, C>
impl<N, C> Clone for ConsensusStore<N, C>
Source§fn clone(&self) -> ConsensusStore<N, C>
fn clone(&self) -> ConsensusStore<N, C>
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, C> Freeze for ConsensusStore<N, C>where
C: Freeze,
impl<N, C> RefUnwindSafe for ConsensusStore<N, C>where
C: RefUnwindSafe,
N: RefUnwindSafe,
impl<N, C> Send for ConsensusStore<N, C>
impl<N, C> Sync for ConsensusStore<N, C>
impl<N, C> Unpin for ConsensusStore<N, C>
impl<N, C> UnwindSafe for ConsensusStore<N, C>where
C: 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> 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