Struct solana_program_test::InvokeContext [−][src]
pub struct InvokeContext<'a> {
    pub sysvars: &'a [(Pubkey, Vec<u8, Global>)],
    pub instruction_recorder: Option<&'a InstructionRecorder>,
    pub feature_set: Arc<FeatureSet>,
    pub timings: ExecuteDetailsTimings,
    pub blockhash: Hash,
    pub lamports_per_signature: u64,
    pub return_data: (Pubkey, Vec<u8, Global>),
    // some fields omitted
}Fields
sysvars: &'a [(Pubkey, Vec<u8, Global>)]instruction_recorder: Option<&'a InstructionRecorder>feature_set: Arc<FeatureSet>timings: ExecuteDetailsTimingsblockhash: Hashlamports_per_signature: u64return_data: (Pubkey, Vec<u8, Global>)Implementations
pub fn new(
    rent: Rent, 
    accounts: &'a [(Pubkey, Rc<RefCell<AccountSharedData>>)], 
    builtin_programs: &'a [BuiltinProgram], 
    sysvars: &'a [(Pubkey, Vec<u8, Global>)], 
    log_collector: Option<Rc<RefCell<LogCollector>>>, 
    compute_budget: ComputeBudget, 
    executors: Rc<RefCell<Executors>>, 
    feature_set: Arc<FeatureSet>, 
    blockhash: Hash, 
    lamports_per_signature: u64
) -> InvokeContext<'a>
pub fn new_mock(
    accounts: &'a [(Pubkey, Rc<RefCell<AccountSharedData>>)], 
    builtin_programs: &'a [BuiltinProgram]
) -> InvokeContext<'a>
Push a stack frame onto the invocation stack
Current depth of the invocation stack
Entrypoint for a cross-program invocation from a builtin program
Helper to prepare for process_instruction()
Process a cross-program instruction
Get the program ID of the currently executing program
Get the owner of the currently executing program
👎 Deprecated since 1.9.0: To be removed together with remove_native_loader
To be removed together with remove_native_loader
Removes the first keyed account
Get the list of keyed accounts
Get the list of keyed accounts skipping first_instruction_account many entries
Get this invocation’s LogCollector
Get this invocation’s ComputeMeter
Loaders may need to do work in order to execute a program. Cache the work that can be re-used across executions
Get the completed loader work that can be re-used across execution
Find an account_index and account by its key
Get this invocation’s compute budget
Get the value of a sysvar by its id
Auto Trait Implementations
impl<'a> !RefUnwindSafe for InvokeContext<'a>
impl<'a> !Send for InvokeContext<'a>
impl<'a> !Sync for InvokeContext<'a>
impl<'a> Unpin for InvokeContext<'a>
impl<'a> !UnwindSafe for InvokeContext<'a>
Blanket Implementations
pub default fn example() -> T
Mutably borrows from an owned value. Read more
fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
pub fn vzip(self) -> V
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more
