pub struct PermissionConsumeCpiBuilder<'a, 'b> { /* private fields */ }Expand description
Instruction builder for PermissionConsume via CPI.
§Accounts:
[writable, signer]subject[writable]permission_config[writable]consumed_permission[]system_program
Implementations§
Source§impl<'a, 'b> PermissionConsumeCpiBuilder<'a, 'b>
impl<'a, 'b> PermissionConsumeCpiBuilder<'a, 'b>
pub fn new(program: &'b AccountInfo<'a>) -> Self
Sourcepub fn subject(&mut self, subject: &'b AccountInfo<'a>) -> &mut Self
pub fn subject(&mut self, subject: &'b AccountInfo<'a>) -> &mut Self
The subject of the permission
Sourcepub fn permission_config(
&mut self,
permission_config: &'b AccountInfo<'a>,
) -> &mut Self
pub fn permission_config( &mut self, permission_config: &'b AccountInfo<'a>, ) -> &mut Self
The permission config account
Sourcepub fn consumed_permission(
&mut self,
consumed_permission: &'b AccountInfo<'a>,
) -> &mut Self
pub fn consumed_permission( &mut self, consumed_permission: &'b AccountInfo<'a>, ) -> &mut Self
The permission program account
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
System program
pub fn permission_message( &mut self, permission_message: PermissionMessage, ) -> &mut Self
pub fn permission_signature( &mut self, permission_signature: PermissionSignature, ) -> &mut Self
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
Trait Implementations§
Source§impl<'a, 'b> Clone for PermissionConsumeCpiBuilder<'a, 'b>
impl<'a, 'b> Clone for PermissionConsumeCpiBuilder<'a, 'b>
Source§fn clone(&self) -> PermissionConsumeCpiBuilder<'a, 'b>
fn clone(&self) -> PermissionConsumeCpiBuilder<'a, 'b>
Returns a copy 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 moreAuto Trait Implementations§
impl<'a, 'b> Freeze for PermissionConsumeCpiBuilder<'a, 'b>
impl<'a, 'b> !RefUnwindSafe for PermissionConsumeCpiBuilder<'a, 'b>
impl<'a, 'b> !Send for PermissionConsumeCpiBuilder<'a, 'b>
impl<'a, 'b> !Sync for PermissionConsumeCpiBuilder<'a, 'b>
impl<'a, 'b> Unpin for PermissionConsumeCpiBuilder<'a, 'b>
impl<'a, 'b> !UnwindSafe for PermissionConsumeCpiBuilder<'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