#[repr(C)]
pub struct AccountPosition {
Show 13 fields pub token: Pubkey, pub address: Pubkey, pub adapter: Pubkey, pub value: [u8; 16], pub balance: u64, pub balance_timestamp: u64, pub price: PriceInfo, pub kind: u32, pub exponent: i16, pub value_modifier: u16, pub max_staleness: u64, pub flags: AdapterPositionFlags, pub _reserved: [u8; 23],
}

Fields

token: Pubkey

The address of the token/mint of the asset

address: Pubkey

The address of the account holding the tokens.

adapter: Pubkey

The address of the adapter managing the asset

value: [u8; 16]

The current value of this position, stored as a Number128 with fixed precision.

balance: u64

The amount of tokens in the account

balance_timestamp: u64

The timestamp of the last balance update

price: PriceInfo

The current price/value of each token

kind: u32

The kind of balance this position contains

exponent: i16

The exponent for the token value

value_modifier: u16

A weight on the value of this asset when counting collateral

max_staleness: u64

The max staleness for the account balance (seconds)

flags: AdapterPositionFlags

Flags that are set by the adapter

_reserved: [u8; 23]

Unused

Implementations

Update the balance for this position

Update the price for this position

Trait Implementations

Deserializes this instance from a given slice of bytes. Updates the buffer to point at the remaining bytes. Read more
Deserialize this instance from a slice of bytes.
Serialize this instance into a vector of bytes.
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

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
Self must have the same layout as the specified Bits except for the possible invalid bit patterns being checked during is_valid_bit_pattern. Read more
If this function returns true, then it must be valid to reinterpret bits as &Self. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
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.