Struct poseidon_client::Instruction
source · [−]pub struct Instruction {
pub program_id: PublicKey,
pub accounts: Vec<AccountMeta>,
pub data: Vec<u8>,
}Fields
program_id: PublicKeyPubkey of the program that executes this instruction.
accounts: Vec<AccountMeta>Metadata describing accounts that should be passed to the program.
data: Vec<u8>Opaque data passed to the program for its own interpretation.
Implementations
sourceimpl Instruction
impl Instruction
pub fn new() -> Self
pub fn add_program_id(&mut self, program_id: PublicKey) -> &mut Self
pub fn add_base58_program_id(
&mut self,
program_id: BorrowedBase58PublicKey<'_>
) -> PoseidonResult<&mut Self>
pub fn add_account(&mut self, account_meta: AccountMeta) -> &mut Self
pub fn add_data(&mut self, instruction_data: &[u8]) -> &mut Self
pub fn build(&mut self) -> &mut Self
pub fn borrow(&self) -> &Self
pub fn take(self) -> Self
Trait Implementations
sourceimpl BorshDeserialize for Instruction where
PublicKey: BorshDeserialize,
Vec<AccountMeta>: BorshDeserialize,
Vec<u8>: BorshDeserialize,
impl BorshDeserialize for Instruction where
PublicKey: BorshDeserialize,
Vec<AccountMeta>: BorshDeserialize,
Vec<u8>: BorshDeserialize,
sourceimpl BorshSerialize for Instruction where
PublicKey: BorshSerialize,
Vec<AccountMeta>: BorshSerialize,
Vec<u8>: BorshSerialize,
impl BorshSerialize for Instruction where
PublicKey: BorshSerialize,
Vec<AccountMeta>: BorshSerialize,
Vec<u8>: BorshSerialize,
sourceimpl Clone for Instruction
impl Clone for Instruction
sourcefn clone(&self) -> Instruction
fn clone(&self) -> Instruction
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for Instruction
impl Debug for Instruction
sourceimpl Default for Instruction
impl Default for Instruction
sourceimpl PartialEq<Instruction> for Instruction
impl PartialEq<Instruction> for Instruction
sourcefn eq(&self, other: &Instruction) -> bool
fn eq(&self, other: &Instruction) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &Instruction) -> bool
fn ne(&self, other: &Instruction) -> bool
This method tests for !=.
sourceimpl Serialize for Instruction
impl Serialize for Instruction
impl StructuralPartialEq for Instruction
Auto Trait Implementations
impl RefUnwindSafe for Instruction
impl Send for Instruction
impl Sync for Instruction
impl Unpin for Instruction
impl UnwindSafe for Instruction
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more