Struct safe_token_2022::extension::transfer_fee::TransferFeeConfig
source · #[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<TransferFeeConfig> for TransferFeeConfig
impl PartialEq<TransferFeeConfig> for TransferFeeConfig
source§fn eq(&self, other: &TransferFeeConfig) -> bool
fn eq(&self, other: &TransferFeeConfig) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for TransferFeeConfig
impl Pod for TransferFeeConfig
impl StructuralPartialEq for TransferFeeConfig
Auto Trait Implementations§
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> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere T: AnyBitPattern,
§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
.