pub trait SVMMessage: Debug {
Show 16 methods
// Required methods
fn num_total_signatures(&self) -> u64;
fn num_write_locks(&self) -> u64;
fn recent_blockhash(&self) -> &Hash;
fn num_instructions(&self) -> usize;
fn instructions_iter(&self) -> impl Iterator<Item = SVMInstruction<'_>>;
fn program_instructions_iter(
&self,
) -> impl Iterator<Item = (&Pubkey, SVMInstruction<'_>)>;
fn account_keys(&self) -> AccountKeys<'_>;
fn fee_payer(&self) -> &Pubkey;
fn is_writable(&self, index: usize) -> bool;
fn is_signer(&self, index: usize) -> bool;
fn is_invoked(&self, key_index: usize) -> bool;
fn num_lookup_tables(&self) -> usize;
fn message_address_table_lookups(
&self,
) -> impl Iterator<Item = SVMMessageAddressTableLookup<'_>>;
// Provided methods
fn is_instruction_account(&self, key_index: usize) -> bool { ... }
fn get_durable_nonce(&self) -> Option<&Pubkey> { ... }
fn get_ix_signers(&self, index: usize) -> impl Iterator<Item = &Pubkey> { ... }
}
Required Methods§
Sourcefn num_total_signatures(&self) -> u64
fn num_total_signatures(&self) -> u64
Returns the total number of signatures in the message. This includes required transaction signatures as well as any pre-compile signatures that are attached in instructions.
Sourcefn num_write_locks(&self) -> u64
fn num_write_locks(&self) -> u64
Returns the number of requested write-locks in this message. This does not consider if write-locks are demoted.
Sourcefn recent_blockhash(&self) -> &Hash
fn recent_blockhash(&self) -> &Hash
Return the recent blockhash.
Sourcefn num_instructions(&self) -> usize
fn num_instructions(&self) -> usize
Return the number of instructions in the message.
Sourcefn instructions_iter(&self) -> impl Iterator<Item = SVMInstruction<'_>>
fn instructions_iter(&self) -> impl Iterator<Item = SVMInstruction<'_>>
Return an iterator over the instructions in the message.
Sourcefn program_instructions_iter(
&self,
) -> impl Iterator<Item = (&Pubkey, SVMInstruction<'_>)>
fn program_instructions_iter( &self, ) -> impl Iterator<Item = (&Pubkey, SVMInstruction<'_>)>
Return an iterator over the instructions in the message, paired with the pubkey of the program.
Sourcefn account_keys(&self) -> AccountKeys<'_>
fn account_keys(&self) -> AccountKeys<'_>
Return the account keys.
Sourcefn is_writable(&self, index: usize) -> bool
fn is_writable(&self, index: usize) -> bool
Returns true
if the account at index
is writable.
Sourcefn is_invoked(&self, key_index: usize) -> bool
fn is_invoked(&self, key_index: usize) -> bool
Returns true if the account at the specified index is invoked as a program in top-level instructions of this message.
Sourcefn num_lookup_tables(&self) -> usize
fn num_lookup_tables(&self) -> usize
Get the number of lookup tables.
Sourcefn message_address_table_lookups(
&self,
) -> impl Iterator<Item = SVMMessageAddressTableLookup<'_>>
fn message_address_table_lookups( &self, ) -> impl Iterator<Item = SVMMessageAddressTableLookup<'_>>
Get message address table lookups used in the message
Provided Methods§
Sourcefn is_instruction_account(&self, key_index: usize) -> bool
fn is_instruction_account(&self, key_index: usize) -> bool
Returns true if the account at the specified index is an input to some program instruction in this message.
Sourcefn get_durable_nonce(&self) -> Option<&Pubkey>
fn get_durable_nonce(&self) -> Option<&Pubkey>
If the message uses a durable nonce, return the pubkey of the nonce account
Sourcefn get_ix_signers(&self, index: usize) -> impl Iterator<Item = &Pubkey>
fn get_ix_signers(&self, index: usize) -> impl Iterator<Item = &Pubkey>
For the instruction at index
, return an iterator over input accounts
that are signers.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.