pub struct FeeStore<N: Network, F: FeeStorage<N>> { /* private fields */ }
Expand description
The fee store.
Implementations§
Source§impl<N: Network, F: FeeStorage<N>> FeeStore<N, F>
impl<N: Network, F: FeeStorage<N>> FeeStore<N, F>
Sourcepub fn open(
transition_store: TransitionStore<N, F::TransitionStorage>,
) -> Result<Self>
pub fn open( transition_store: TransitionStore<N, F::TransitionStorage>, ) -> Result<Self>
Initializes the fee store.
Sourcepub fn insert(
&self,
transaction_id: N::TransactionID,
fee: &Fee<N>,
) -> Result<()>
pub fn insert( &self, transaction_id: N::TransactionID, fee: &Fee<N>, ) -> Result<()>
Stores the given (transaction_id, fee)
into storage.
Sourcepub fn remove(&self, transaction_id: &N::TransactionID) -> Result<()>
pub fn remove(&self, transaction_id: &N::TransactionID) -> Result<()>
Removes the fee for the given transaction ID
.
Sourcepub fn transition_store(&self) -> &TransitionStore<N, F::TransitionStorage>
pub fn transition_store(&self) -> &TransitionStore<N, F::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<()>
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, F: FeeStorage<N>> FeeStore<N, F>
impl<N: Network, F: FeeStorage<N>> FeeStore<N, F>
Source§impl<N: Network, F: FeeStorage<N>> FeeStore<N, F>
impl<N: Network, F: FeeStorage<N>> FeeStore<N, F>
Sourcepub fn find_transaction_id_from_transition_id(
&self,
transition_id: &N::TransitionID,
) -> Result<Option<N::TransactionID>>
pub fn find_transaction_id_from_transition_id( &self, transition_id: &N::TransitionID, ) -> Result<Option<N::TransactionID>>
Returns the transaction ID that deployed the given transition ID
.
Trait Implementations§
Auto Trait Implementations§
impl<N, F> Freeze for FeeStore<N, F>where
F: Freeze,
impl<N, F> RefUnwindSafe for FeeStore<N, F>where
F: RefUnwindSafe,
N: RefUnwindSafe,
impl<N, F> Send for FeeStore<N, F>
impl<N, F> Sync for FeeStore<N, F>
impl<N, F> Unpin for FeeStore<N, F>
impl<N, F> UnwindSafe for FeeStore<N, F>where
F: 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