pub struct CollectBuilder { /* private fields */ }
Expand description
Instruction builder for Collect
.
§Accounts:
[writable, optional]
recipient1 (default to8AT6o8Qk5T9QnZvPThMrF9bcCQLTGkyGvVZZzHgCw11v
)[writable, optional]
recipient2 (default toMmHsqX4LxTfifxoH8BVRLUKrwDn1LPCac6YcCZTHhwt
)
Implementations§
Source§impl CollectBuilder
impl CollectBuilder
pub fn new() -> Self
Sourcepub fn recipient1(&mut self, recipient1: Pubkey) -> &mut Self
pub fn recipient1(&mut self, recipient1: Pubkey) -> &mut Self
[optional account, default to '8AT6o8Qk5T9QnZvPThMrF9bcCQLTGkyGvVZZzHgCw11v']
The address of the recipient 1
Sourcepub fn recipient2(&mut self, recipient2: Pubkey) -> &mut Self
pub fn recipient2(&mut self, recipient2: Pubkey) -> &mut Self
[optional account, default to 'MmHsqX4LxTfifxoH8BVRLUKrwDn1LPCac6YcCZTHhwt']
The address of the recipient 2
Sourcepub fn add_remaining_account(&mut self, account: AccountMeta) -> &mut Self
pub fn add_remaining_account(&mut self, account: AccountMeta) -> &mut Self
Add an aditional 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 Default for CollectBuilder
impl Default for CollectBuilder
Source§fn default() -> CollectBuilder
fn default() -> CollectBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CollectBuilder
impl RefUnwindSafe for CollectBuilder
impl Send for CollectBuilder
impl Sync for CollectBuilder
impl Unpin for CollectBuilder
impl UnwindSafe for CollectBuilder
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more