pub struct CommitteeStore<N: Network, C: CommitteeStorage<N>> { /* private fields */ }
Expand description
The committee store.
Implementations§
Source§impl<N: Network, C: CommitteeStorage<N>> CommitteeStore<N, C>
impl<N: Network, C: CommitteeStorage<N>> CommitteeStore<N, C>
Sourcepub fn open<S: Clone + Into<StorageMode>>(storage: S) -> Result<Self>
pub fn open<S: Clone + Into<StorageMode>>(storage: S) -> Result<Self>
Initializes the committee 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<()>
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, C: CommitteeStorage<N>> CommitteeStore<N, C>
impl<N: Network, C: CommitteeStorage<N>> CommitteeStore<N, C>
Source§impl<N: Network, C: CommitteeStorage<N>> CommitteeStore<N, C>
impl<N: Network, C: CommitteeStorage<N>> CommitteeStore<N, C>
Sourcepub fn current_round(&self) -> Result<u64>
pub fn current_round(&self) -> Result<u64>
Returns the current round.
Sourcepub fn current_height(&self) -> Result<u32>
pub fn current_height(&self) -> Result<u32>
Returns the current height.
Sourcepub fn current_committee(&self) -> Result<Committee<N>>
pub fn current_committee(&self) -> Result<Committee<N>>
Returns the current committee.
Sourcepub fn get_height_for_round(&self, round: u64) -> Result<Option<u32>>
pub fn get_height_for_round(&self, round: u64) -> Result<Option<u32>>
Returns the height for the given round
.
Trait Implementations§
Source§impl<N: Clone + Network, C: Clone + CommitteeStorage<N>> Clone for CommitteeStore<N, C>
impl<N: Clone + Network, C: Clone + CommitteeStorage<N>> Clone for CommitteeStore<N, C>
Source§fn clone(&self) -> CommitteeStore<N, C>
fn clone(&self) -> CommitteeStore<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 CommitteeStore<N, C>where
C: Freeze,
impl<N, C> RefUnwindSafe for CommitteeStore<N, C>where
C: RefUnwindSafe,
N: RefUnwindSafe,
impl<N, C> Send for CommitteeStore<N, C>
impl<N, C> Sync for CommitteeStore<N, C>
impl<N, C> Unpin for CommitteeStore<N, C>
impl<N, C> UnwindSafe for CommitteeStore<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> 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