Struct spl_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
sourceimpl 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
sourceimpl Clone for TransferFeeConfig
impl Clone for TransferFeeConfig
sourcefn clone(&self) -> TransferFeeConfig
fn clone(&self) -> TransferFeeConfig
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for TransferFeeConfig
impl Debug for TransferFeeConfig
sourceimpl Default for TransferFeeConfig
impl Default for TransferFeeConfig
sourcefn default() -> TransferFeeConfig
fn default() -> TransferFeeConfig
Returns the “default value” for a type. Read more
sourceimpl Extension for TransferFeeConfig
impl Extension for TransferFeeConfig
sourceconst TYPE: ExtensionType = ExtensionType::TransferFeeConfig
const TYPE: ExtensionType = ExtensionType::TransferFeeConfig
Associated extension type enum, checked at the start of TLV entries
sourceimpl PartialEq<TransferFeeConfig> for TransferFeeConfig
impl PartialEq<TransferFeeConfig> for TransferFeeConfig
sourcefn 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 ==
. Read more
sourcefn ne(&self, other: &TransferFeeConfig) -> bool
fn ne(&self, other: &TransferFeeConfig) -> bool
This method tests for !=
.
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
impl<T> AbiExample for T
impl<T> AbiExample for T
default fn example() -> T
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> CheckedBitPattern for T where
T: AnyBitPattern,
impl<T> CheckedBitPattern for T where
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
. Read more
sourcefn 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
.
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more