pub struct Create<'a> {
pub funding_account: &'a AccountView,
pub account: &'a AccountView,
pub wallet: &'a AccountView,
pub mint: &'a AccountView,
pub system_program: &'a AccountView,
pub token_program: &'a AccountView,
}Expand description
Creates an associated token account for the given wallet address and token mint. Returns an error if the account exists.
§Accounts:
[WRITE, SIGNER]Funding account (must be a system account)[WRITE]Associated token account address to be created[]Wallet address for the new associated token account[]The token mint for the new associated token account[]System program[]SPL Token program
Fields§
§funding_account: &'a AccountViewFunding account (must be a system account)
account: &'a AccountViewAssociated token account address to be created
wallet: &'a AccountViewWallet address for the new associated token account
mint: &'a AccountViewThe token mint for the new associated token account
system_program: &'a AccountViewSystem program
token_program: &'a AccountViewSPL Token program
Implementations§
Source§impl Create<'_>
impl Create<'_>
pub fn invoke(&self) -> Result<(), ProgramError>
pub fn invoke_signed( &self, signers: &[Signer<'_, '_>], ) -> Result<(), ProgramError>
Auto Trait Implementations§
impl<'a> Freeze for Create<'a>
impl<'a> RefUnwindSafe for Create<'a>
impl<'a> !Send for Create<'a>
impl<'a> !Sync for Create<'a>
impl<'a> Unpin for Create<'a>
impl<'a> UnsafeUnpin for Create<'a>
impl<'a> UnwindSafe for Create<'a>
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