#[repr(u16)]pub enum ExtensionType {
Show 14 variants
Uninitialized = 0,
TransferFeeConfig = 1,
TransferFeeAmount = 2,
MintCloseAuthority = 3,
ConfidentialTransferMint = 4,
ConfidentialTransferAccount = 5,
DefaultAccountState = 6,
ImmutableOwner = 7,
MemoTransfer = 8,
NonTransferable = 9,
InterestBearingConfig = 10,
CpiGuard = 11,
PermanentDelegate = 12,
NonTransferableAccount = 13,
}
Expand description
Extensions that can be applied to mints or accounts. Mint extensions must only be applied to mint accounts, and account extensions must only be applied to token holding accounts.
Variants§
Uninitialized = 0
Used as padding if the account size would otherwise be 355, same as a multisig
TransferFeeConfig = 1
Includes transfer fee rate info and accompanying authorities to withdraw and set the fee
TransferFeeAmount = 2
Includes withheld transfer fees
MintCloseAuthority = 3
Includes an optional mint close authority
ConfidentialTransferMint = 4
Auditor configuration for confidential transfers
ConfidentialTransferAccount = 5
State for confidential transfers
DefaultAccountState = 6
Specifies the default Account::state for new Accounts
ImmutableOwner = 7
Indicates that the Account owner authority cannot be changed
MemoTransfer = 8
Require inbound transfers to have memo
NonTransferable = 9
Indicates that the tokens from this mint can’t be transfered
InterestBearingConfig = 10
Tokens accrue interest over time,
CpiGuard = 11
Locks privileged token operations from happening via CPI
PermanentDelegate = 12
Includes an optional permanent delegate
NonTransferableAccount = 13
Indicates that the tokens in this account belong to a non-transferable mint
Implementations§
Source§impl ExtensionType
impl ExtensionType
Sourcepub fn get_type_len(&self) -> usize
pub fn get_type_len(&self) -> usize
Get the data length of the type associated with the enum
Sourcepub fn get_account_len<S: BaseState>(extension_types: &[Self]) -> usize
pub fn get_account_len<S: BaseState>(extension_types: &[Self]) -> usize
Get the required account data length for the given ExtensionTypes
Sourcepub fn get_account_type(&self) -> AccountType
pub fn get_account_type(&self) -> AccountType
Get the associated account type
Sourcepub fn get_required_init_account_extensions(
mint_extension_types: &[Self],
) -> Vec<Self>
pub fn get_required_init_account_extensions( mint_extension_types: &[Self], ) -> Vec<Self>
Based on a set of AccountType::Mint ExtensionTypes, get the list of AccountType::Account ExtensionTypes required on InitializeAccount
Trait Implementations§
Source§impl Clone for ExtensionType
impl Clone for ExtensionType
Source§fn clone(&self) -> ExtensionType
fn clone(&self) -> ExtensionType
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for ExtensionType
impl Debug for ExtensionType
Source§impl From<ExtensionType> for [u8; 2]
impl From<ExtensionType> for [u8; 2]
Source§fn from(a: ExtensionType) -> Self
fn from(a: ExtensionType) -> Self
Source§impl From<ExtensionType> for u16
impl From<ExtensionType> for u16
Source§fn from(enum_value: ExtensionType) -> Self
fn from(enum_value: ExtensionType) -> Self
Source§impl PartialEq for ExtensionType
impl PartialEq for ExtensionType
Source§impl TryFrom<&[u8]> for ExtensionType
impl TryFrom<&[u8]> for ExtensionType
Source§impl TryFrom<u16> for ExtensionType
impl TryFrom<u16> for ExtensionType
Source§type Error = TryFromPrimitiveError<ExtensionType>
type Error = TryFromPrimitiveError<ExtensionType>
Source§impl TryFromPrimitive for ExtensionType
impl TryFromPrimitive for ExtensionType
impl Copy for ExtensionType
impl StructuralPartialEq for ExtensionType
Auto Trait Implementations§
impl Freeze for ExtensionType
impl RefUnwindSafe for ExtensionType
impl Send for ExtensionType
impl Sync for ExtensionType
impl Unpin for ExtensionType
impl UnwindSafe for ExtensionType
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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