Struct anchor_lang::Context
source · [−]pub struct Context<'a, 'b, 'c, 'info, T> {
pub program_id: &'a Pubkey,
pub accounts: &'b mut T,
pub remaining_accounts: &'c [AccountInfo<'info>],
}
Expand description
Provides non-argument inputs to the program.
Fields
program_id: &'a Pubkey
Currently executing program id.
accounts: &'b mut T
Deserialized accounts.
remaining_accounts: &'c [AccountInfo<'info>]
Remaining accounts given but not deserialized or validated. Be very careful when using this directly.
Implementations
Auto Trait Implementations
impl<'a, 'b, 'c, 'info, T> !RefUnwindSafe for Context<'a, 'b, 'c, 'info, T>
impl<'a, 'b, 'c, 'info, T> !Send for Context<'a, 'b, 'c, 'info, T>
impl<'a, 'b, 'c, 'info, T> !Sync for Context<'a, 'b, 'c, 'info, T>
impl<'a, 'b, 'c, 'info, T> Unpin for Context<'a, 'b, 'c, 'info, T> where
'info: 'c,
impl<'a, 'b, 'c, 'info, T> !UnwindSafe for Context<'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