pub struct CreatePolicyBuilder { /* private fields */ }Expand description
Instruction builder for CreatePolicy.
§Accounts:
[]mint[]token_account[writable]policy[writable, signer]payer[writable, signer]owner[optional]system_program (default to11111111111111111111111111111111)
Implementations§
Source§impl CreatePolicyBuilder
impl CreatePolicyBuilder
pub fn new() -> Self
Sourcepub fn mint(&mut self, mint: Pubkey) -> &mut Self
pub fn mint(&mut self, mint: Pubkey) -> &mut Self
The token extensions mint account linked to the policy
Sourcepub fn token_account(&mut self, token_account: Pubkey) -> &mut Self
pub fn token_account(&mut self, token_account: Pubkey) -> &mut Self
The authority over the policy based on token ownership of the mint
Sourcepub fn system_program(&mut self, system_program: Pubkey) -> &mut Self
pub fn system_program(&mut self, system_program: Pubkey) -> &mut Self
[optional account, default to '11111111111111111111111111111111']
The system program
pub fn strategy(&mut self, strategy: PermissionStrategy) -> &mut Self
Sourcepub fn add_remaining_account(&mut self, account: AccountMeta) -> &mut Self
pub fn add_remaining_account(&mut self, account: AccountMeta) -> &mut Self
Add an additional account to the instruction.
Sourcepub fn add_remaining_accounts(&mut self, accounts: &[AccountMeta]) -> &mut Self
pub fn add_remaining_accounts(&mut self, accounts: &[AccountMeta]) -> &mut Self
Add additional accounts to the instruction.
pub fn instruction(&self) -> Instruction
Trait Implementations§
Source§impl Clone for CreatePolicyBuilder
impl Clone for CreatePolicyBuilder
Source§fn clone(&self) -> CreatePolicyBuilder
fn clone(&self) -> CreatePolicyBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CreatePolicyBuilder
impl Debug for CreatePolicyBuilder
Source§impl Default for CreatePolicyBuilder
impl Default for CreatePolicyBuilder
Source§fn default() -> CreatePolicyBuilder
fn default() -> CreatePolicyBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CreatePolicyBuilder
impl RefUnwindSafe for CreatePolicyBuilder
impl Send for CreatePolicyBuilder
impl Sync for CreatePolicyBuilder
impl Unpin for CreatePolicyBuilder
impl UnwindSafe for CreatePolicyBuilder
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