[][src]Struct solana_sdk::transaction::Instruction

pub struct Instruction<P, Q> {
    pub program_ids_index: P,
    pub accounts: Vec<Q>,
    pub userdata: Vec<u8>,
}

An instruction to execute a program

Fields

program_ids_index: P

Index into the transaction program ids array indicating the program account that executes this instruction

accounts: Vec<Q>

Ordered indices into the transaction keys array indicating which accounts to pass to the program

userdata: Vec<u8>

The program input data

Methods

impl<P, Q> Instruction<P, Q>[src]

pub fn new<T: Serialize>(
    program_ids_index: P,
    userdata: &T,
    accounts: Vec<Q>
) -> Self
[src]

impl Instruction<u8, u8>[src]

pub fn serialize_with(
    writer: &mut Cursor<&mut [u8]>,
    ix: &Self
) -> Result<(), Error>
[src]

pub fn deserialize_from(reader: &mut Cursor<&[u8]>) -> Result<Self, Error>[src]

pub fn serialized_size(&self) -> Result<u64, Error>[src]

Trait Implementations

impl<P: PartialEq, Q: PartialEq> PartialEq<Instruction<P, Q>> for Instruction<P, Q>[src]

impl<P: Clone, Q: Clone> Clone for Instruction<P, Q>[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl<P: Eq, Q: Eq> Eq for Instruction<P, Q>[src]

impl<P: Debug, Q: Debug> Debug for Instruction<P, Q>[src]

impl<'de, P, Q> Deserialize<'de> for Instruction<P, Q> where
    P: Deserialize<'de>,
    Q: Deserialize<'de>, 
[src]

impl<P, Q> Serialize for Instruction<P, Q> where
    P: Serialize,
    Q: Serialize
[src]

Auto Trait Implementations

impl<P, Q> Send for Instruction<P, Q> where
    P: Send,
    Q: Send

impl<P, Q> Sync for Instruction<P, Q> where
    P: Sync,
    Q: Sync

Blanket Implementations

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

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

type Owned = T

impl<T> From for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

impl<T, U> TryInto 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<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same for T

type Output = T

Should always be Self

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