pub struct Message {
pub header: MessageHeader,
pub account_keys: Vec<Pubkey, Global>,
pub recent_blockhash: Hash,
pub instructions: Vec<CompiledInstruction, Global>,
pub address_table_lookups: Vec<MessageAddressTableLookup, Global>,
}
Expand description
A Solana transaction message (v0).
This message format supports succinct account loading with on-chain address lookup tables.
See the message
module documentation for further description.
Fields
header: MessageHeader
The message header, identifying signed and read-only account_keys
account_keys: Vec<Pubkey, Global>
List of accounts loaded by this transaction.
recent_blockhash: Hash
The blockhash of a recent block.
instructions: Vec<CompiledInstruction, Global>
Instructions that invoke a designated program, are executed in sequence, and committed in one atomic transaction if all succeed.
Notes
Account and program indexes will index into the list of addresses constructed from the concatenation of three key lists:
- message
account_keys
- ordered list of keys loaded from
writable
lookup table indexes - ordered list of keys loaded from
readable
lookup table indexes
address_table_lookups: Vec<MessageAddressTableLookup, Global>
List of address table lookups used to load additional accounts for this transaction.
Implementations
sourceimpl Message
impl Message
sourcepub fn serialize(&self) -> Vec<u8, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
pub fn serialize(&self) -> Vec<u8, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
Serialize this message with a version #0 prefix using bincode encoding.
sourcepub fn is_key_called_as_program(&self, key_index: usize) -> bool
pub fn is_key_called_as_program(&self, key_index: usize) -> bool
Returns true if the account at the specified index is called as a program by an instruction
sourcepub fn is_maybe_writable(&self, key_index: usize) -> bool
pub fn is_maybe_writable(&self, key_index: usize) -> bool
Returns true if the account at the specified index was requested as writable. Before loading addresses, we can’t demote write locks for dynamically loaded addresses so this should not be used by the runtime.
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Message
impl<'de> Deserialize<'de> for Message
sourcefn deserialize<__D>(
__deserializer: __D
) -> Result<Message, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<Message, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Serialize for Message
impl Serialize for Message
sourcefn 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
impl Eq for Message
impl StructuralEq for Message
impl StructuralPartialEq for Message
Auto Trait Implementations
impl RefUnwindSafe for Message
impl Send for Message
impl Sync for Message
impl Unpin for Message
impl UnwindSafe for Message
Blanket Implementations
sourceimpl<T> AbiEnumVisitor for T where
T: Serialize + ?Sized,
impl<T> AbiEnumVisitor for T where
T: Serialize + ?Sized,
default fn visit_for_abi(
&self,
_digester: &mut AbiDigester
) -> Result<AbiDigester, DigestError>
sourceimpl<T> AbiEnumVisitor for T where
T: Serialize + AbiExample + ?Sized,
impl<T> AbiEnumVisitor for T where
T: Serialize + AbiExample + ?Sized,
default fn visit_for_abi(
&self,
digester: &mut AbiDigester
) -> Result<AbiDigester, DigestError>
sourceimpl<T> AbiExample for T
impl<T> AbiExample for T
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
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more