#[repr(C)]pub struct AdditionalAccounts {
pub protocol_version: u8,
pub has_more: u8,
pub _padding_1: [u8; 2],
pub num_accounts: u32,
pub accounts: [Pubkey; 30],
pub writable_bits: [u8; 30],
pub _padding_2: [u8; 26],
}Fields§
§protocol_version: u8§has_more: u8§_padding_1: [u8; 2]§num_accounts: u32§accounts: [Pubkey; 30]§writable_bits: [u8; 30]§_padding_2: [u8; 26]Implementations§
source§impl AdditionalAccounts
impl AdditionalAccounts
pub fn new() -> Self
pub fn has_space_available(&self) -> bool
pub fn set_has_more(&mut self, has_more: bool)
pub fn add_account(&mut self, pubkey: &Pubkey, writable: bool) -> Result<()>
pub fn iter(&self) -> impl DoubleEndedIterator<Item = (&Pubkey, bool)>
pub fn iter_from( &self, start: usize ) -> impl DoubleEndedIterator<Item = (&Pubkey, bool)>
pub fn from_return_data(data: &[u8]) -> Result<&Self>
Trait Implementations§
source§impl BorshDeserialize for AdditionalAccounts
impl BorshDeserialize for AdditionalAccounts
fn deserialize_reader<R: Read>(reader: &mut R) -> Result<Self, Error>
§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, 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.
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
source§impl BorshSerialize for AdditionalAccounts
impl BorshSerialize for AdditionalAccounts
source§impl Clone for AdditionalAccounts
impl Clone for AdditionalAccounts
source§fn clone(&self) -> AdditionalAccounts
fn clone(&self) -> AdditionalAccounts
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 AdditionalAccounts
impl Debug for AdditionalAccounts
source§impl Default for AdditionalAccounts
impl Default for AdditionalAccounts
impl Copy for AdditionalAccounts
impl Pod for AdditionalAccounts
Auto Trait Implementations§
impl RefUnwindSafe for AdditionalAccounts
impl Send for AdditionalAccounts
impl Sync for AdditionalAccounts
impl Unpin for AdditionalAccounts
impl UnwindSafe for AdditionalAccounts
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> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
§type Bits = T
type Bits = T
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern.source§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self.