pub struct CreateCollectionV1CpiBuilder<'a, 'b> { /* private fields */ }Expand description
Instruction builder for CreateCollectionV1 via CPI.
§Accounts:
[writable, signer]collection[optional]update_authority[writable, signer]payer[]system_program
Implementations§
source§impl<'a, 'b> CreateCollectionV1CpiBuilder<'a, 'b>
impl<'a, 'b> CreateCollectionV1CpiBuilder<'a, 'b>
pub fn new(program: &'b AccountInfo<'a>) -> Self
sourcepub fn collection(&mut self, collection: &'b AccountInfo<'a>) -> &mut Self
pub fn collection(&mut self, collection: &'b AccountInfo<'a>) -> &mut Self
The address of the new asset
[optional account]
The authority of the new asset
sourcepub fn payer(&mut self, payer: &'b AccountInfo<'a>) -> &mut Self
pub fn payer(&mut self, payer: &'b AccountInfo<'a>) -> &mut Self
The account paying for the storage fees
sourcepub fn system_program(
&mut self,
system_program: &'b AccountInfo<'a>
) -> &mut Self
pub fn system_program( &mut self, system_program: &'b AccountInfo<'a> ) -> &mut Self
The system program
pub fn name(&mut self, name: String) -> &mut Self
pub fn uri(&mut self, uri: String) -> &mut Self
sourcepub fn plugins(&mut self, plugins: Vec<PluginAuthorityPair>) -> &mut Self
pub fn plugins(&mut self, plugins: Vec<PluginAuthorityPair>) -> &mut Self
[optional argument]
sourcepub fn add_remaining_account(
&mut self,
account: &'b AccountInfo<'a>,
is_writable: bool,
is_signer: bool
) -> &mut Self
pub fn add_remaining_account( &mut self, account: &'b AccountInfo<'a>, is_writable: bool, is_signer: bool ) -> &mut Self
Add an additional account to the instruction.
sourcepub fn add_remaining_accounts(
&mut self,
accounts: &[(&'b AccountInfo<'a>, bool, bool)]
) -> &mut Self
pub fn add_remaining_accounts( &mut self, accounts: &[(&'b AccountInfo<'a>, bool, bool)] ) -> &mut Self
Add additional accounts to the instruction.
Each account is represented by a tuple of the AccountInfo, a bool indicating whether the account is writable or not,
and a bool indicating whether the account is a signer or not.
pub fn invoke(&self) -> ProgramResult
pub fn invoke_signed(&self, signers_seeds: &[&[&[u8]]]) -> ProgramResult
Auto Trait Implementations§
impl<'a, 'b> Freeze for CreateCollectionV1CpiBuilder<'a, 'b>
impl<'a, 'b> !RefUnwindSafe for CreateCollectionV1CpiBuilder<'a, 'b>
impl<'a, 'b> !Send for CreateCollectionV1CpiBuilder<'a, 'b>
impl<'a, 'b> !Sync for CreateCollectionV1CpiBuilder<'a, 'b>
impl<'a, 'b> Unpin for CreateCollectionV1CpiBuilder<'a, 'b>
impl<'a, 'b> !UnwindSafe for CreateCollectionV1CpiBuilder<'a, 'b>
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