Struct solana_program::instruction::Instruction [−][src]
pub struct Instruction {
pub program_id: Pubkey,
pub accounts: Vec<AccountMeta>,
pub data: Vec<u8>,
}Fields
program_id: PubkeyPubkey of the instruction processor that executes this instruction
accounts: Vec<AccountMeta>Metadata for what accounts should be passed to the instruction processor
data: Vec<u8>Opaque data passed to the instruction processor
Implementations
👎 Deprecated since 1.6.0:
Please use another Instruction constructor instead, such as Instruction::new_with_bincode
pub fn new_with_bincode<T: Serialize>(
program_id: Pubkey,
data: &T,
accounts: Vec<AccountMeta>
) -> Selfpub fn new_with_borsh<T: BorshSerialize>(
program_id: Pubkey,
data: &T,
accounts: Vec<AccountMeta>
) -> SelfTrait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>, Deserialize this value from the given Serde deserializer. Read more
This method tests for self and other values to be equal, and is used
by ==. Read more
This method tests for !=.
Auto Trait Implementations
impl RefUnwindSafe for Instructionimpl Send for Instructionimpl Sync for Instructionimpl Unpin for Instructionimpl UnwindSafe for InstructionBlanket Implementations
pub default fn visit_for_abi(
&self,
_digester: &mut AbiDigester
) -> Result<AbiDigester, DigestError>pub default fn visit_for_abi(
&self,
digester: &mut AbiDigester
) -> Result<AbiDigester, DigestError>Mutably borrows from an owned value. Read more
type Output = T
type Output = TShould always be Self
pub fn vzip(self) -> V