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§
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
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 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,
§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: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default 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