Struct solana_sdk::process_instruction::MockInvokeContext [−][src]
pub struct MockInvokeContext<'a> { pub invoke_stack: Vec<InvokeContextStackFrame<'a>>, pub logger: MockLogger, pub bpf_compute_budget: BpfComputeBudget, pub compute_meter: MockComputeMeter, pub programs: Vec<(Pubkey, ProcessInstructionWithContext)>, pub accounts: Vec<(Pubkey, Rc<RefCell<AccountSharedData>>)>, pub sysvars: Vec<(Pubkey, Option<Rc<Vec<u8>>>)>, }
Fields
invoke_stack: Vec<InvokeContextStackFrame<'a>>
logger: MockLogger
bpf_compute_budget: BpfComputeBudget
compute_meter: MockComputeMeter
programs: Vec<(Pubkey, ProcessInstructionWithContext)>
accounts: Vec<(Pubkey, Rc<RefCell<AccountSharedData>>)>
sysvars: Vec<(Pubkey, Option<Rc<Vec<u8>>>)>
Implementations
impl<'a> MockInvokeContext<'a>
[src]
impl<'a> MockInvokeContext<'a>
[src]pub fn new(keyed_accounts: Vec<KeyedAccount<'a>>) -> Self
[src]
Trait Implementations
impl<'a> InvokeContext for MockInvokeContext<'a>
[src]
impl<'a> InvokeContext for MockInvokeContext<'a>
[src]fn push(
&mut self,
key: &Pubkey,
keyed_accounts: &[(bool, bool, &Pubkey, &RefCell<AccountSharedData>)]
) -> Result<(), InstructionError>
[src]
fn push(
&mut self,
key: &Pubkey,
keyed_accounts: &[(bool, bool, &Pubkey, &RefCell<AccountSharedData>)]
) -> Result<(), InstructionError>
[src]Push a stack frame onto the invocation stack Read more
fn invoke_depth(&self) -> usize
[src]
fn invoke_depth(&self) -> usize
[src]Current depth of the invocation stake
fn verify_and_update(
&mut self,
_message: &Message,
_instruction: &CompiledInstruction,
_accounts: &[Rc<RefCell<AccountSharedData>>],
_caller_pivileges: Option<&[bool]>
) -> Result<(), InstructionError>
[src]
fn verify_and_update(
&mut self,
_message: &Message,
_instruction: &CompiledInstruction,
_accounts: &[Rc<RefCell<AccountSharedData>>],
_caller_pivileges: Option<&[bool]>
) -> Result<(), InstructionError>
[src]Verify and update PreAccount state based on program execution
fn get_caller(&self) -> Result<&Pubkey, InstructionError>
[src]
fn get_caller(&self) -> Result<&Pubkey, InstructionError>
[src]Get the program ID of the currently executing program
fn remove_first_keyed_account(&mut self) -> Result<(), InstructionError>
[src]
fn remove_first_keyed_account(&mut self) -> Result<(), InstructionError>
[src]Removes the first keyed account
fn get_keyed_accounts(&self) -> Result<&[KeyedAccount<'_>], InstructionError>
[src]
fn get_keyed_accounts(&self) -> Result<&[KeyedAccount<'_>], InstructionError>
[src]Get the list of keyed accounts
fn get_programs(&self) -> &[(Pubkey, ProcessInstructionWithContext)]ⓘ
[src]
fn get_programs(&self) -> &[(Pubkey, ProcessInstructionWithContext)]ⓘ
[src]Get a list of built-in programs
fn get_logger(&self) -> Rc<RefCell<dyn Logger>>
[src]
fn get_logger(&self) -> Rc<RefCell<dyn Logger>>
[src]Get this invocation’s logger
fn get_bpf_compute_budget(&self) -> &BpfComputeBudget
[src]
fn get_bpf_compute_budget(&self) -> &BpfComputeBudget
[src]Get this invocation’s compute budget
fn get_compute_meter(&self) -> Rc<RefCell<dyn ComputeMeter>>
[src]
fn get_compute_meter(&self) -> Rc<RefCell<dyn ComputeMeter>>
[src]Get this invocation’s compute meter
fn add_executor(&self, _pubkey: &Pubkey, _executor: Arc<dyn Executor>)
[src]
fn add_executor(&self, _pubkey: &Pubkey, _executor: Arc<dyn Executor>)
[src]Loaders may need to do work in order to execute a program. Cache the work that can be re-used across executions Read more
fn get_executor(&self, _pubkey: &Pubkey) -> Option<Arc<dyn Executor>>
[src]
fn get_executor(&self, _pubkey: &Pubkey) -> Option<Arc<dyn Executor>>
[src]Get the completed loader work that can be re-used across executions
fn record_instruction(&self, _instruction: &Instruction)
[src]
fn record_instruction(&self, _instruction: &Instruction)
[src]Record invoked instruction
fn is_feature_active(&self, _feature_id: &Pubkey) -> bool
[src]
fn is_feature_active(&self, _feature_id: &Pubkey) -> bool
[src]Get the bank’s active feature set
fn get_account(&self, pubkey: &Pubkey) -> Option<Rc<RefCell<AccountSharedData>>>
[src]
fn get_account(&self, pubkey: &Pubkey) -> Option<Rc<RefCell<AccountSharedData>>>
[src]Get an account from a pre-account
Auto Trait Implementations
impl<'a> !RefUnwindSafe for MockInvokeContext<'a>
impl<'a> !Send for MockInvokeContext<'a>
impl<'a> !Sync for MockInvokeContext<'a>
impl<'a> Unpin for MockInvokeContext<'a>
impl<'a> !UnwindSafe for MockInvokeContext<'a>
Blanket Implementations
impl<T> AbiExample for T
[src]
impl<T> AbiExample for T
[src]impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,