pub struct TransferFeeRate {
pub epoch: u64,
pub maximum_fee: u64,
pub basis_points: u16,
}Expand description
Per-epoch fee rate parameters.
Token-2022 stores the older and newer rate side-by-side so that a fee
schedule change scheduled in epoch N does not surprise transfers
already submitted in epoch N - 1.
Fields§
§epoch: u64Epoch from which this rate is effective.
maximum_fee: u64Maximum fee in raw token units (cap on the fee). Applied after the basis-points calculation.
basis_points: u16Fee rate in basis points (10_000 = 100%). Values above 10_000 are rejected by Token-2022 at config time and rejected here as invalid.
Trait Implementations§
Source§impl Clone for TransferFeeRate
impl Clone for TransferFeeRate
Source§fn clone(&self) -> TransferFeeRate
fn clone(&self) -> TransferFeeRate
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 TransferFeeRate
impl Debug for TransferFeeRate
Source§impl PartialEq for TransferFeeRate
impl PartialEq for TransferFeeRate
Source§fn eq(&self, other: &TransferFeeRate) -> bool
fn eq(&self, other: &TransferFeeRate) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for TransferFeeRate
impl Eq for TransferFeeRate
impl StructuralPartialEq for TransferFeeRate
Auto Trait Implementations§
impl Freeze for TransferFeeRate
impl RefUnwindSafe for TransferFeeRate
impl Send for TransferFeeRate
impl Sync for TransferFeeRate
impl Unpin for TransferFeeRate
impl UnsafeUnpin for TransferFeeRate
impl UnwindSafe for TransferFeeRate
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