Struct anchor_lang::CpiContext
source · [−]pub struct CpiContext<'a, 'b, 'c, 'info, T> where
T: ToAccountMetas + ToAccountInfos<'info>, {
pub accounts: T,
pub remaining_accounts: Vec<AccountInfo<'info>>,
pub program: AccountInfo<'info>,
pub signer_seeds: &'a [&'b [&'c [u8]]],
}
Expand description
Context specifying non-argument inputs for cross-program-invocations.
Fields
accounts: T
remaining_accounts: Vec<AccountInfo<'info>>
program: AccountInfo<'info>
signer_seeds: &'a [&'b [&'c [u8]]]
Implementations
sourceimpl<'a, 'b, 'c, 'info, T> CpiContext<'a, 'b, 'c, 'info, T> where
T: ToAccountMetas + ToAccountInfos<'info>,
impl<'a, 'b, 'c, 'info, T> CpiContext<'a, 'b, 'c, 'info, T> where
T: ToAccountMetas + ToAccountInfos<'info>,
pub fn new(program: AccountInfo<'info>, accounts: T) -> Self
pub fn new_with_signer(
program: AccountInfo<'info>,
accounts: T,
signer_seeds: &'a [&'b [&'c [u8]]]
) -> Self
pub fn with_signer(self, signer_seeds: &'a [&'b [&'c [u8]]]) -> Self
pub fn with_remaining_accounts(self, ra: Vec<AccountInfo<'info>>) -> Self
Trait Implementations
sourceimpl<'info, T: Accounts<'info>> ToAccountInfos<'info> for CpiContext<'_, '_, '_, 'info, T>
impl<'info, T: Accounts<'info>> ToAccountInfos<'info> for CpiContext<'_, '_, '_, 'info, T>
fn to_account_infos(&self) -> Vec<AccountInfo<'info>>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
Auto Trait Implementations
impl<'a, 'b, 'c, 'info, T> !RefUnwindSafe for CpiContext<'a, 'b, 'c, 'info, T>
impl<'a, 'b, 'c, 'info, T> !Send for CpiContext<'a, 'b, 'c, 'info, T>
impl<'a, 'b, 'c, 'info, T> !Sync for CpiContext<'a, 'b, 'c, 'info, T>
impl<'a, 'b, 'c, 'info, T> Unpin for CpiContext<'a, 'b, 'c, 'info, T> where
T: Unpin,
'b: 'a,
'c: 'a,
impl<'a, 'b, 'c, 'info, T> !UnwindSafe for CpiContext<'a, 'b, 'c, 'info, T>
Blanket Implementations
impl<T> AbiExample for T
impl<T> AbiExample for T
default fn example() -> T
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more