#[repr(C)]
pub struct Account { pub mint: Pubkey, pub owner: Pubkey, pub amount: u64, pub delegate: COption<Pubkey>, pub state: AccountState, pub is_native: COption<u64>, pub delegated_amount: u64, pub close_authority: COption<Pubkey>, }
Expand description

Account data.

Fields

mint: Pubkey

The mint associated with this account

owner: Pubkey

The owner of this account.

amount: u64

The amount of tokens this account holds.

delegate: COption<Pubkey>

If delegate is Some then delegated_amount represents the amount authorized by the delegate

state: AccountState

The account’s state

is_native: COption<u64>

If is_native.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: u64

The amount delegated

close_authority: COption<Pubkey>

Optional authority to close the account.

Implementations

Checks if account is frozen

Checks if account is native

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Is initialized

The length, in bytes, of the packed representation

Get the packed length

Unpack from slice and check if initialized

Unpack from slice without checking if initialized

Pack into slice

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.