pub struct BoardFees {
pub min_fee: Amount,
pub base_fee: Amount,
pub ppm: PpmFeeRate,
}Expand description
Fees for boarding the ark.
Fields§
§min_fee: AmountMinimum fee to charge.
base_fee: AmountA fee applied to every transaction regardless of value.
ppm: PpmFeeRatePPM (parts per million) fee rate to apply based on the value of the transaction.
Implementations§
Source§impl BoardFees
impl BoardFees
Sourcepub fn calculate(&self, amount: Amount) -> Option<Amount>
pub fn calculate(&self, amount: Amount) -> Option<Amount>
Calculate the total fee for a board operation.
Returns the maximum of the calculated fee (base_fee + ppm) and the minimum fee. None if an
overflow occurs.
Sourcepub fn calculate_legacy(&self, amount: Amount) -> Option<Amount>
👎Deprecated: only for protocol versions <= 3
pub fn calculate_legacy(&self, amount: Amount) -> Option<Amount>
only for protocol versions <= 3
BoardFees::calculate for clients on protocol versions that round the ppm fee down.
Trait Implementations§
impl Copy for BoardFees
Source§impl<'de> Deserialize<'de> for BoardFees
impl<'de> Deserialize<'de> for BoardFees
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
impl Eq for BoardFees
impl StructuralPartialEq for BoardFees
Auto Trait Implementations§
impl Freeze for BoardFees
impl RefUnwindSafe for BoardFees
impl Send for BoardFees
impl Sync for BoardFees
impl Unpin for BoardFees
impl UnsafeUnpin for BoardFees
impl UnwindSafe for BoardFees
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