#[repr(C)]pub struct InAccount {
pub discriminator: [u8; 8],
pub data_hash: [u8; 32],
pub merkle_context: PackedMerkleContext,
pub root_index: u16,
pub lamports: u64,
pub address: Option<[u8; 32]>,
}Expand description
Input compressed account for read-only operations.
Fields§
§discriminator: [u8; 8]§data_hash: [u8; 32]Data hash
merkle_context: PackedMerkleContextMerkle tree context.
root_index: u16Root index.
lamports: u64Lamports.
address: Option<[u8; 32]>Optional address.
Implementations§
Source§impl InAccount
impl InAccount
pub fn into_packed_compressed_account_with_merkle_context( &self, owner: Pubkey, ) -> PackedCompressedAccountWithMerkleContext
Trait Implementations§
Source§impl BorshDeserialize for InAccountwhere
[u8; 8]: BorshDeserialize,
[u8; 32]: BorshDeserialize,
PackedMerkleContext: BorshDeserialize,
u16: BorshDeserialize,
u64: BorshDeserialize,
Option<[u8; 32]>: BorshDeserialize,
impl BorshDeserialize for InAccountwhere
[u8; 8]: BorshDeserialize,
[u8; 32]: BorshDeserialize,
PackedMerkleContext: BorshDeserialize,
u16: BorshDeserialize,
u64: BorshDeserialize,
Option<[u8; 32]>: BorshDeserialize,
fn deserialize_reader<R>(reader: &mut R) -> Result<InAccount, Error>where
R: Read,
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 InAccountwhere
[u8; 8]: BorshSerialize,
[u8; 32]: BorshSerialize,
PackedMerkleContext: BorshSerialize,
u16: BorshSerialize,
u64: BorshSerialize,
Option<[u8; 32]>: BorshSerialize,
impl BorshSerialize for InAccountwhere
[u8; 8]: BorshSerialize,
[u8; 32]: BorshSerialize,
PackedMerkleContext: BorshSerialize,
u16: BorshSerialize,
u64: BorshSerialize,
Option<[u8; 32]>: BorshSerialize,
Source§impl From<InAccount> for InAccountInfo
impl From<InAccount> for InAccountInfo
Source§fn from(account: InAccount) -> InAccountInfo
fn from(account: InAccount) -> InAccountInfo
Converts to this type from the input type.
Source§impl From<PackedCompressedAccountWithMerkleContext> for InAccount
impl From<PackedCompressedAccountWithMerkleContext> for InAccount
Source§fn from(value: PackedCompressedAccountWithMerkleContext) -> InAccount
fn from(value: PackedCompressedAccountWithMerkleContext) -> InAccount
Converts to this type from the input type.
Source§impl<'a> ZeroCopyAtMut<'a> for InAccount
impl<'a> ZeroCopyAtMut<'a> for InAccount
type ZeroCopyAtMut = ZInAccountMut<'a>
fn zero_copy_at_mut( __remaining_bytes: &'a mut [u8], ) -> Result<(<InAccount as ZeroCopyAtMut<'a>>::ZeroCopyAtMut, &'a mut [u8]), ZeroCopyError>
Source§impl<'a> ZeroCopyNew<'a> for InAccount
impl<'a> ZeroCopyNew<'a> for InAccount
Source§type ZeroCopyConfig = InAccountConfig
type ZeroCopyConfig = InAccountConfig
Configuration type needed to initialize this type
Source§type Output = <InAccount as ZeroCopyAtMut<'a>>::ZeroCopyAtMut
type Output = <InAccount as ZeroCopyAtMut<'a>>::ZeroCopyAtMut
Output type - the mutable zero-copy view of this type
Source§fn byte_len(
config: &<InAccount as ZeroCopyNew<'a>>::ZeroCopyConfig,
) -> Result<usize, ZeroCopyError>
fn byte_len( config: &<InAccount as ZeroCopyNew<'a>>::ZeroCopyConfig, ) -> Result<usize, ZeroCopyError>
Calculate the byte length needed for this type with the given configuration Read more
Source§fn new_zero_copy(
__remaining_bytes: &'a mut [u8],
config: <InAccount as ZeroCopyNew<'a>>::ZeroCopyConfig,
) -> Result<(<InAccount as ZeroCopyNew<'a>>::Output, &'a mut [u8]), ZeroCopyError>
fn new_zero_copy( __remaining_bytes: &'a mut [u8], config: <InAccount as ZeroCopyNew<'a>>::ZeroCopyConfig, ) -> Result<(<InAccount as ZeroCopyNew<'a>>::Output, &'a mut [u8]), ZeroCopyError>
Initialize this type in a mutable byte slice with the given configuration Read more
Source§impl ZeroCopyStructInnerMut for InAccount
impl ZeroCopyStructInnerMut for InAccount
type ZeroCopyInnerMut = ZInAccountMut<'static>
impl StructuralPartialEq for InAccount
Auto Trait Implementations§
impl Freeze for InAccount
impl RefUnwindSafe for InAccount
impl Send for InAccount
impl Sync for InAccount
impl Unpin for InAccount
impl UnwindSafe for InAccount
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