#[repr(C)]pub struct TransferFeeConfig {
pub transfer_fee_config_authority: OptionalNonZeroPubkey,
pub withdraw_withheld_authority: OptionalNonZeroPubkey,
pub withheld_amount: PodU64,
pub older_transfer_fee: TransferFee,
pub newer_transfer_fee: TransferFee,
}
Expand description
Transfer fee extension data for mints.
Fields§
Optional authority to set the fee
Withdraw from mint instructions must be signed by this key
withheld_amount: PodU64
Withheld transfer fee tokens that have been moved to the mint for withdrawal
older_transfer_fee: TransferFee
Older transfer fee, used if the current epoch < new_transfer_fee.epoch
newer_transfer_fee: TransferFee
Newer transfer fee, used if the current epoch >= new_transfer_fee.epoch
Implementations§
Source§impl TransferFeeConfig
impl TransferFeeConfig
Sourcepub fn get_epoch_fee(&self, epoch: Epoch) -> &TransferFee
pub fn get_epoch_fee(&self, epoch: Epoch) -> &TransferFee
Get the fee for the given epoch
Trait Implementations§
Source§impl Clone for TransferFeeConfig
impl Clone for TransferFeeConfig
Source§fn clone(&self) -> TransferFeeConfig
fn clone(&self) -> TransferFeeConfig
Returns a copy 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 TransferFeeConfig
impl Debug for TransferFeeConfig
Source§impl Default for TransferFeeConfig
impl Default for TransferFeeConfig
Source§fn default() -> TransferFeeConfig
fn default() -> TransferFeeConfig
Returns the “default value” for a type. Read more
Source§impl Extension for TransferFeeConfig
impl Extension for TransferFeeConfig
Source§const TYPE: ExtensionType = ExtensionType::TransferFeeConfig
const TYPE: ExtensionType = ExtensionType::TransferFeeConfig
Associated extension type enum, checked at the start of TLV entries
Source§impl PartialEq for TransferFeeConfig
impl PartialEq for TransferFeeConfig
impl Copy for TransferFeeConfig
impl Pod for TransferFeeConfig
impl StructuralPartialEq for TransferFeeConfig
Auto Trait Implementations§
impl Freeze for TransferFeeConfig
impl RefUnwindSafe for TransferFeeConfig
impl Send for TransferFeeConfig
impl Sync for TransferFeeConfig
impl Unpin for TransferFeeConfig
impl UnwindSafe for TransferFeeConfig
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> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
Source§type Bits = T
type Bits = T
Self
must have the same layout as the specified Bits
except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern
.Source§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self
.Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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