pub struct SerializableInstruction {
pub program_id: Pubkey,
pub accounts: Vec<SerializableAccount, Global>,
pub data: Vec<u8, Global>,
}
Expand description
The data needed execute an instruction on Solana.
Fields§
§program_id: Pubkey
Pubkey of the instruction processor that executes this instruction
accounts: Vec<SerializableAccount, Global>
Metadata for what accounts should be passed to the instruction processor
data: Vec<u8, Global>
Opaque data passed to the instruction processor
Trait Implementations§
source§impl BorshDeserialize for SerializableInstructionwhere
Pubkey: BorshDeserialize,
Vec<SerializableAccount, Global>: BorshDeserialize,
Vec<u8, Global>: BorshDeserialize,
impl BorshDeserialize for SerializableInstructionwhere Pubkey: BorshDeserialize, Vec<SerializableAccount, Global>: BorshDeserialize, Vec<u8, Global>: BorshDeserialize,
source§fn deserialize(buf: &mut &[u8]) -> Result<SerializableInstruction, Error>
fn deserialize(buf: &mut &[u8]) -> Result<SerializableInstruction, Error>
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes.
§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
Deserialize this instance from a slice of bytes.
source§impl BorshSchema for SerializableInstructionwhere
Pubkey: BorshSchema,
Vec<SerializableAccount, Global>: BorshSchema,
Vec<u8, Global>: BorshSchema,
impl BorshSchema for SerializableInstructionwhere Pubkey: BorshSchema, Vec<SerializableAccount, Global>: BorshSchema, Vec<u8, Global>: BorshSchema,
source§fn declaration() -> String
fn declaration() -> String
Get the name of the type without brackets.
source§fn add_definitions_recursively(
definitions: &mut HashMap<String, Definition, RandomState>
)
fn add_definitions_recursively( definitions: &mut HashMap<String, Definition, RandomState> )
Recursively, using DFS, add type definitions required for this type. For primitive types
this is an empty map. Type definition explains how to serialize/deserialize a type.
§fn add_definition(
declaration: String,
definition: Definition,
definitions: &mut HashMap<String, Definition, RandomState>
)
fn add_definition( declaration: String, definition: Definition, definitions: &mut HashMap<String, Definition, RandomState> )
Helper method to add a single type definition to the map.
fn schema_container() -> BorshSchemaContainer
source§impl BorshSerialize for SerializableInstructionwhere
Pubkey: BorshSerialize,
Vec<SerializableAccount, Global>: BorshSerialize,
Vec<u8, Global>: BorshSerialize,
impl BorshSerialize for SerializableInstructionwhere Pubkey: BorshSerialize, Vec<SerializableAccount, Global>: BorshSerialize, Vec<u8, Global>: BorshSerialize,
source§impl Clone for SerializableInstruction
impl Clone for SerializableInstruction
source§fn clone(&self) -> SerializableInstruction
fn clone(&self) -> SerializableInstruction
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for SerializableInstruction
impl Debug for SerializableInstruction
source§impl<'de> Deserialize<'de> for SerializableInstruction
impl<'de> Deserialize<'de> for SerializableInstruction
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<SerializableInstruction, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>( __deserializer: __D ) -> Result<SerializableInstruction, <__D as Deserializer<'de>>::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<Instruction> for SerializableInstruction
impl From<Instruction> for SerializableInstruction
source§fn from(instruction: Instruction) -> SerializableInstruction
fn from(instruction: Instruction) -> SerializableInstruction
Converts to this type from the input type.
source§impl Hash for SerializableInstruction
impl Hash for SerializableInstruction
source§impl PartialEq<SerializableInstruction> for SerializableInstruction
impl PartialEq<SerializableInstruction> for SerializableInstruction
source§fn eq(&self, other: &SerializableInstruction) -> bool
fn eq(&self, other: &SerializableInstruction) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for SerializableInstruction
impl Serialize for SerializableInstruction
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where __S: Serializer,
Serialize this value into the given Serde serializer. Read more