Struct Mint

Source
#[repr(C)]
pub struct Mint { pub mint_authority: COption<Pubkey>, pub decimals: u8, pub freeze_authority: COption<Pubkey>, /* private fields */ }
Expand description

Internal representation of a mint data.

Fields§

§mint_authority: COption<Pubkey>

Optional authority used to mint new tokens. The mint authority may only be provided during mint creation. If no mint authority is present then the mint has a fixed supply and no further tokens may be minted.

§decimals: u8

Number of base 10 digits to the right of the decimal place.

§freeze_authority: COption<Pubkey>

Optional authority to freeze token accounts.

Implementations§

Source§

impl Mint

Source

pub fn set_supply(&mut self, supply: u64)

Source

pub fn supply(&self) -> u64

Source

pub fn set_initialized(&mut self, value: bool)

Source

pub fn clear_mint_authority(&mut self)

Source

pub fn set_mint_authority(&mut self, mint_authority: &Pubkey)

Source

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

Source

pub fn clear_freeze_authority(&mut self)

Source

pub fn set_freeze_authority(&mut self, freeze_authority: &Pubkey)

Source

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

Trait Implementations§

Source§

impl Initializable for Mint

Source§

fn is_initialized(&self) -> bool

Return true if the object is initialized.
Source§

impl RawType for Mint

Source§

const LEN: usize = 82usize

The length of the Mint account data.

Auto Trait Implementations§

§

impl Freeze for Mint

§

impl RefUnwindSafe for Mint

§

impl Send for Mint

§

impl Sync for Mint

§

impl Unpin 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<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.