Struct solana_sdk::instruction::Instruction[][src]

pub struct Instruction {
    pub program_id: Pubkey,
    pub accounts: Vec<AccountMeta, Global>,
    pub data: Vec<u8, Global>,
}

Fields

program_id: Pubkey

Pubkey of the instruction processor that executes this instruction

accounts: Vec<AccountMeta, Global>

Metadata for what accounts should be passed to the instruction processor

data: Vec<u8, Global>

Opaque data passed to the instruction processor

Implementations

impl Instruction[src]

pub fn new<T>(
    program_id: Pubkey,
    data: &T,
    accounts: Vec<AccountMeta, Global>
) -> Instruction where
    T: Serialize
[src]

👎 Deprecated since 1.6.0:

Please use another `Instruction constructor instead

pub fn new_with_bincode<T>(
    program_id: Pubkey,
    data: &T,
    accounts: Vec<AccountMeta, Global>
) -> Instruction where
    T: Serialize
[src]

pub fn new_with_borsh<T>(
    program_id: Pubkey,
    data: &T,
    accounts: Vec<AccountMeta, Global>
) -> Instruction where
    T: BorshSerialize, 
[src]

pub fn new_with_bytes(
    program_id: Pubkey,
    data: &[u8],
    accounts: Vec<AccountMeta, Global>
) -> Instruction
[src]

Trait Implementations

impl Clone for Instruction[src]

impl Debug for Instruction[src]

impl<'de> Deserialize<'de> for Instruction[src]

impl PartialEq<Instruction> for Instruction[src]

impl Serialize for Instruction[src]

impl StructuralPartialEq for Instruction[src]

Auto Trait Implementations

Blanket Implementations

impl<T> AbiEnumVisitor for T where
    T: Serialize + ?Sized
[src]

impl<T> AbiEnumVisitor for T where
    T: AbiExample + Serialize + ?Sized
[src]

impl<T> AbiExample for T[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,