Skip to main content

MintExtension

Enum MintExtension 

Source
pub enum MintExtension<'a> {
    TransferFeeConfig {
        authority: Option<&'a Address>,
        withdraw_authority: Option<&'a Address>,
        basis_points: u16,
        maximum_fee: u64,
    },
    MintCloseAuthority(Option<&'a Address>),
    NonTransferable,
    PermanentDelegate(&'a Address),
    TransferHook {
        authority: Option<&'a Address>,
        program_id: Option<&'a Address>,
    },
    MetadataPointer {
        authority: Option<&'a Address>,
        metadata_address: Option<&'a Address>,
    },
}
Expand description

Fixed-size mint extensions supported by MintPlan.

Extension authorities and hook/metadata addresses use Token-2022’s nullable address encoding where applicable. Some(zero_address) is rejected for those fields, rather than silently being interpreted as None.

Variants§

§

TransferFeeConfig

Fields

§authority: Option<&'a Address>
§withdraw_authority: Option<&'a Address>
§basis_points: u16
§maximum_fee: u64
§

MintCloseAuthority(Option<&'a Address>)

§

NonTransferable

§

PermanentDelegate(&'a Address)

§

TransferHook

Fields

§authority: Option<&'a Address>
§program_id: Option<&'a Address>
§

MetadataPointer

Fields

§authority: Option<&'a Address>
§metadata_address: Option<&'a Address>

Implementations§

Source§

impl MintExtension<'_>

Source

pub const fn extension_type(&self) -> u16

Token-2022’s TLV extension discriminator (not an instruction tag).

Source

pub fn instruction_data(&self) -> Result<MintInstructionData, ProgramError>

Canonical instruction bytes, also usable by off-chain instruction builders.

Trait Implementations§

Source§

impl<'a> Clone for MintExtension<'a>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a> Copy for MintExtension<'a>

Auto Trait Implementations§

§

impl<'a> Freeze for MintExtension<'a>

§

impl<'a> RefUnwindSafe for MintExtension<'a>

§

impl<'a> Send for MintExtension<'a>

§

impl<'a> Sync for MintExtension<'a>

§

impl<'a> Unpin for MintExtension<'a>

§

impl<'a> UnsafeUnpin for MintExtension<'a>

§

impl<'a> UnwindSafe for MintExtension<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.