Skip to main content

Mint

Struct Mint 

Source
pub struct Mint(/* private fields */);

Implementations§

Source§

impl Mint

Source

pub const LEN: usize = SplMint::LEN

Methods from Deref<Target = SplMint>§

Source

pub const LEN: usize

Source

pub fn has_mint_authority(&self) -> bool

Source

pub fn mint_authority(&self) -> Option<&Address>

Source

pub fn mint_authority_unchecked(&self) -> &Address

Return the mint authority.

This method should be used when the caller knows that the mint will have a mint authority set since it skips the Option check.

Source

pub fn supply(&self) -> u64

Source

pub fn decimals(&self) -> u8

Source

pub fn is_initialized(&self) -> bool

Source

pub fn has_freeze_authority(&self) -> bool

Source

pub fn freeze_authority(&self) -> Option<&Address>

Source

pub fn freeze_authority_unchecked(&self) -> &Address

Return the freeze authority.

This method should be used when the caller knows that the mint will have a freeze authority set since it skips the Option check.

Trait Implementations§

Source§

impl Deref for Mint

Source§

type Target = Mint

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl Discriminator for Mint

Source§

const DISCRIMINATOR: &'static [u8]

The discriminator bytes.
Source§

impl Owner for Mint

Source§

const OWNER: Address = TOKEN_PROGRAM_ID

The owner address.
Source§

impl Owners for Mint

Source§

const OWNERS: &'static [Address]

The owner addresses.
Source§

impl RefFromBytes for Mint

Source§

fn read(data: &[u8]) -> Option<&Self>

Source§

fn read_mut(_data: &mut [u8]) -> Option<&mut Self>

Auto Trait Implementations§

§

impl Freeze for Mint

§

impl RefUnwindSafe for Mint

§

impl Send for Mint

§

impl Sync for Mint

§

impl Unpin for Mint

§

impl UnsafeUnpin for Mint

§

impl UnwindSafe for Mint

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> 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<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.