pub struct MintExtensionFlags {
pub has_pausable: bool,
pub has_permanent_delegate: bool,
pub has_default_account_state: bool,
pub default_state_frozen: bool,
pub has_transfer_fee: bool,
pub has_transfer_hook: bool,
}Expand description
Flags for mint extensions that affect Token account initialization and transfers
Fields§
§has_pausable: boolWhether the mint has the PausableAccount extension
has_permanent_delegate: boolWhether the mint has the PermanentDelegate extension
has_default_account_state: boolWhether the mint has the DefaultAccountState extension (restricted regardless of state)
default_state_frozen: boolWhether DefaultAccountState is currently set to Frozen (for Token account creation)
has_transfer_fee: boolWhether the mint has the TransferFeeConfig extension
has_transfer_hook: boolWhether the mint has the TransferHook extension (with nil program_id)
Implementations§
Source§impl MintExtensionFlags
impl MintExtensionFlags
pub fn num_token_account_extensions(&self) -> usize
Sourcepub fn calculate_account_size(
&self,
compressible: bool,
) -> Result<u64, ZeroCopyError>
pub fn calculate_account_size( &self, compressible: bool, ) -> Result<u64, ZeroCopyError>
Sourcepub const fn has_restricted_extensions(&self) -> bool
pub const fn has_restricted_extensions(&self) -> bool
Returns true if mint has any restricted extensions. Restricted extensions (Pausable, PermanentDelegate, TransferFee, TransferHook, DefaultAccountState) require compression_only mode when compressing tokens.
Trait Implementations§
Source§impl Clone for MintExtensionFlags
impl Clone for MintExtensionFlags
Source§fn clone(&self) -> MintExtensionFlags
fn clone(&self) -> MintExtensionFlags
Returns a duplicate 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 MintExtensionFlags
impl Debug for MintExtensionFlags
Source§impl Default for MintExtensionFlags
impl Default for MintExtensionFlags
Source§fn default() -> MintExtensionFlags
fn default() -> MintExtensionFlags
Returns the “default value” for a type. Read more
impl Copy for MintExtensionFlags
Auto Trait Implementations§
impl Freeze for MintExtensionFlags
impl RefUnwindSafe for MintExtensionFlags
impl Send for MintExtensionFlags
impl Sync for MintExtensionFlags
impl Unpin for MintExtensionFlags
impl UnwindSafe for MintExtensionFlags
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> 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>
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