pub struct MarketCloseCpiBuilder<'a, 'b> { /* private fields */ }Expand description
Instruction builder for MarketClose via CPI.
§Accounts:
[writable, signer]authority[writable]market[]mint_a[]mint_b[writable]market_a[writable]market_b[]system_program[]ata_program[]token_program_a[]token_program_b
Implementations§
Source§impl<'a, 'b> MarketCloseCpiBuilder<'a, 'b>
impl<'a, 'b> MarketCloseCpiBuilder<'a, 'b>
pub fn new(program: &'b AccountInfo<'a>) -> Self
The market authority
Sourcepub fn market(&mut self, market: &'b AccountInfo<'a>) -> &mut Self
pub fn market(&mut self, market: &'b AccountInfo<'a>) -> &mut Self
The market
Sourcepub fn mint_a(&mut self, mint_a: &'b AccountInfo<'a>) -> &mut Self
pub fn mint_a(&mut self, mint_a: &'b AccountInfo<'a>) -> &mut Self
The token a mint
Sourcepub fn mint_b(&mut self, mint_b: &'b AccountInfo<'a>) -> &mut Self
pub fn mint_b(&mut self, mint_b: &'b AccountInfo<'a>) -> &mut Self
The token b mint
Sourcepub fn market_a(&mut self, market_a: &'b AccountInfo<'a>) -> &mut Self
pub fn market_a(&mut self, market_a: &'b AccountInfo<'a>) -> &mut Self
The market token account for token a
Sourcepub fn market_b(&mut self, market_b: &'b AccountInfo<'a>) -> &mut Self
pub fn market_b(&mut self, market_b: &'b AccountInfo<'a>) -> &mut Self
The market token account for token b
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
Sourcepub fn ata_program(&mut self, ata_program: &'b AccountInfo<'a>) -> &mut Self
pub fn ata_program(&mut self, ata_program: &'b AccountInfo<'a>) -> &mut Self
The ata program
Sourcepub fn token_program_a(
&mut self,
token_program_a: &'b AccountInfo<'a>,
) -> &mut Self
pub fn token_program_a( &mut self, token_program_a: &'b AccountInfo<'a>, ) -> &mut Self
The token program for token a
Sourcepub fn token_program_b(
&mut self,
token_program_b: &'b AccountInfo<'a>,
) -> &mut Self
pub fn token_program_b( &mut self, token_program_b: &'b AccountInfo<'a>, ) -> &mut Self
The token program for token b
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 MarketCloseCpiBuilder<'a, 'b>
impl<'a, 'b> Clone for MarketCloseCpiBuilder<'a, 'b>
Source§fn clone(&self) -> MarketCloseCpiBuilder<'a, 'b>
fn clone(&self) -> MarketCloseCpiBuilder<'a, 'b>
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 moreAuto Trait Implementations§
impl<'a, 'b> Freeze for MarketCloseCpiBuilder<'a, 'b>
impl<'a, 'b> !RefUnwindSafe for MarketCloseCpiBuilder<'a, 'b>
impl<'a, 'b> !Send for MarketCloseCpiBuilder<'a, 'b>
impl<'a, 'b> !Sync for MarketCloseCpiBuilder<'a, 'b>
impl<'a, 'b> Unpin for MarketCloseCpiBuilder<'a, 'b>
impl<'a, 'b> !UnwindSafe for MarketCloseCpiBuilder<'a, 'b>
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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