#[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 AdditionalAccountswhere
u8: BorshDeserialize,
[u8; 2]: BorshDeserialize,
u32: BorshDeserialize,
[Pubkey; 30]: BorshDeserialize,
[u8; 30]: BorshDeserialize,
[u8; 26]: BorshDeserialize,
impl BorshDeserialize for AdditionalAccountswhere
u8: BorshDeserialize,
[u8; 2]: BorshDeserialize,
u32: BorshDeserialize,
[Pubkey; 30]: BorshDeserialize,
[u8; 30]: BorshDeserialize,
[u8; 26]: BorshDeserialize,
fn deserialize_reader<R: Read>(reader: &mut R) -> Result<Self, Error>
Source§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.
Source§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 AdditionalAccountswhere
u8: BorshSerialize,
[u8; 2]: BorshSerialize,
u32: BorshSerialize,
[Pubkey; 30]: BorshSerialize,
[u8; 30]: BorshSerialize,
[u8; 26]: BorshSerialize,
impl BorshSerialize for AdditionalAccountswhere
u8: BorshSerialize,
[u8; 2]: BorshSerialize,
u32: BorshSerialize,
[Pubkey; 30]: BorshSerialize,
[u8; 30]: BorshSerialize,
[u8; 26]: BorshSerialize,
Source§impl Clone for AdditionalAccounts
impl Clone for AdditionalAccounts
Source§fn clone(&self) -> AdditionalAccounts
fn clone(&self) -> AdditionalAccounts
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 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 Freeze for AdditionalAccounts
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,
Source§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.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