pub struct RefreshFees {
pub base_fee: Amount,
pub ppm_expiry_table: Vec<PpmExpiryFeeEntry>,
}Expand description
Fees for refresh operations.
Fields§
§base_fee: AmountA fee applied to every transaction regardless of value.
ppm_expiry_table: Vec<PpmExpiryFeeEntry>A table mapping how soon a VTXO will expire to a PPM (parts per million) fee rate.
The table should be sorted by each expiry_blocks_threshold value in ascending order.
Implementations§
Source§impl RefreshFees
impl RefreshFees
Sourcepub fn calculate(
&self,
vtxos: impl IntoIterator<Item = VtxoFeeInfo>,
) -> Option<Amount>
pub fn calculate( &self, vtxos: impl IntoIterator<Item = VtxoFeeInfo>, ) -> Option<Amount>
Calculate the total fee for a refresh operation.
Returns None if an overflow occurs.
Sourcepub fn calculate_no_base_fee(
&self,
vtxos: impl IntoIterator<Item = VtxoFeeInfo>,
) -> Option<Amount>
pub fn calculate_no_base_fee( &self, vtxos: impl IntoIterator<Item = VtxoFeeInfo>, ) -> Option<Amount>
Calculate the fee for a refresh operation, excluding the base fee.
Returns None if an overflow occurs.
Trait Implementations§
Source§impl Clone for RefreshFees
impl Clone for RefreshFees
Source§fn clone(&self) -> RefreshFees
fn clone(&self) -> RefreshFees
Returns a duplicate 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 Debug for RefreshFees
impl Debug for RefreshFees
Source§impl<'de> Deserialize<'de> for RefreshFees
impl<'de> Deserialize<'de> for RefreshFees
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for RefreshFees
impl Hash for RefreshFees
Source§impl PartialEq for RefreshFees
impl PartialEq for RefreshFees
Source§impl Serialize for RefreshFees
impl Serialize for RefreshFees
impl Eq for RefreshFees
impl StructuralPartialEq for RefreshFees
Auto Trait Implementations§
impl Freeze for RefreshFees
impl RefUnwindSafe for RefreshFees
impl Send for RefreshFees
impl Sync for RefreshFees
impl Unpin for RefreshFees
impl UnsafeUnpin for RefreshFees
impl UnwindSafe for RefreshFees
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