pub struct MappedMessage {
pub message: Message,
pub mapped_addresses: MappedAddresses,
}
Expand description
Combination of a version #0 message and its mapped addresses
Fields§
§message: Message
Message which loaded a collection of mapped addresses
mapped_addresses: MappedAddresses
Collection of mapped addresses loaded by this message
Implementations§
Source§impl MappedMessage
impl MappedMessage
Sourcepub fn account_keys_len(&self) -> usize
pub fn account_keys_len(&self) -> usize
Returns the total length of loaded accounts for this message
Sourcepub fn account_keys_iter(&self) -> impl Iterator<Item = &Pubkey>
pub fn account_keys_iter(&self) -> impl Iterator<Item = &Pubkey>
Iterator for the addresses of the loaded accounts for this message
Sourcepub fn has_duplicates(&self) -> bool
pub fn has_duplicates(&self) -> bool
Returns true if any account keys are duplicates
Sourcepub fn get_account_key(&self, index: usize) -> Option<&Pubkey>
pub fn get_account_key(&self, index: usize) -> Option<&Pubkey>
Returns the address of the account at the specified index of the list of message account keys constructed from unmapped keys, followed by mapped writable addresses, and lastly the list of mapped readonly addresses.
Sourcepub fn is_writable(
&self,
key_index: usize,
demote_program_write_locks: bool,
) -> bool
pub fn is_writable( &self, key_index: usize, demote_program_write_locks: bool, ) -> bool
Returns true if the account at the specified index was loaded as writable
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
Trait Implementations§
Source§impl Clone for MappedMessage
impl Clone for MappedMessage
Source§fn clone(&self) -> MappedMessage
fn clone(&self) -> MappedMessage
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for MappedMessage
impl RefUnwindSafe for MappedMessage
impl Send for MappedMessage
impl Sync for MappedMessage
impl Unpin for MappedMessage
impl UnwindSafe for MappedMessage
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more