Struct spl_token_2022::pod::PodAccount
source · #[repr(C)]pub struct PodAccount {
pub mint: Pubkey,
pub owner: Pubkey,
pub amount: PodU64,
pub delegate: PodCOption<Pubkey>,
pub state: u8,
pub is_native: PodCOption<PodU64>,
pub delegated_amount: PodU64,
pub close_authority: PodCOption<Pubkey>,
}
Expand description
[Account] data stored as a Pod type
Fields§
§mint: Pubkey
The mint associated with this account
owner: Pubkey
The owner of this account.
amount: PodU64
The amount of tokens this account holds.
delegate: PodCOption<Pubkey>
If delegate
is Some
then delegated_amount
represents
the amount authorized by the delegate
state: u8
The account’s AccountState, stored as a u8
is_native: PodCOption<PodU64>
If is_some, this is a native token, and the value logs the rent-exempt reserve. An Account is required to be rent-exempt, so the value is used by the Processor to ensure that wrapped SOL accounts do not drop below this threshold.
delegated_amount: PodU64
The amount delegated
Optional authority to close the account.
Implementations§
Trait Implementations§
source§impl BaseState for PodAccount
impl BaseState for PodAccount
source§const ACCOUNT_TYPE: AccountType = AccountType::Account
const ACCOUNT_TYPE: AccountType = AccountType::Account
Associated extension type enum, checked at the start of TLV entries
source§impl Clone for PodAccount
impl Clone for PodAccount
source§fn clone(&self) -> PodAccount
fn clone(&self) -> PodAccount
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 PodAccount
impl Debug for PodAccount
source§impl Default for PodAccount
impl Default for PodAccount
source§fn default() -> PodAccount
fn default() -> PodAccount
Returns the “default value” for a type. Read more
source§impl IsInitialized for PodAccount
impl IsInitialized for PodAccount
source§fn is_initialized(&self) -> bool
fn is_initialized(&self) -> bool
Is initialized
source§impl PackedSizeOf for PodAccount
impl PackedSizeOf for PodAccount
source§impl PartialEq for PodAccount
impl PartialEq for PodAccount
source§fn eq(&self, other: &PodAccount) -> bool
fn eq(&self, other: &PodAccount) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for PodAccount
impl Pod for PodAccount
impl StructuralPartialEq for PodAccount
Auto Trait Implementations§
impl Freeze for PodAccount
impl RefUnwindSafe for PodAccount
impl Send for PodAccount
impl Sync for PodAccount
impl Unpin for PodAccount
impl UnwindSafe for PodAccount
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
.source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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