pub struct InstructionContext { /* private fields */ }
Expand description

Loaded instruction shared between runtime and programs.

This context is valid for the entire duration of a (possibly cross program) instruction being processed.

Implementations

New

How many Instructions were on the stack after this one was pushed

That is the number of nested parent Instructions plus one (itself).

Number of program accounts

Number of accounts in this Instruction (without program accounts)

Assert that enough account were supplied to this Instruction

Data parameter for the programs process_instruction handler

Searches for a program account by its key

Searches for an instruction account by its key

Translates the given instruction wide program_account_index into a transaction wide index

Translates the given instruction wide instruction_account_index into a transaction wide index

Returns Some(instruction_account_index) if this is a duplicate and None if it is the first account with this key

Gets the key of the last program account of this Instruction

Gets the last program account of this Instruction

Tries to borrow a program account from this Instruction

Gets an instruction account of this Instruction

Returns whether an instruction account is a signer

Returns whether an instruction account is writable

Calculates the set of all keys of signer instruction accounts in this Instruction

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.