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