#[repr(C)]
pub struct PriceAccount {
Show 22 fields pub magic: u32, pub ver: u32, pub atype: u32, pub size: u32, pub ptype: PriceType, pub expo: i32, pub num: u32, pub num_qt: u32, pub last_slot: u64, pub valid_slot: u64, pub ema_price: Rational, pub ema_conf: Rational, pub drv1: i64, pub drv2: i64, pub prod: AccKey, pub next: AccKey, pub prev_slot: u64, pub prev_price: i64, pub prev_conf: u64, pub drv3: i64, pub agg: PriceInfo, pub comp: [PriceComp; 32],
}
Expand description

Price accounts represent a continuously-updating price feed for a product.

Fields

magic: u32

pyth magic number

ver: u32

program version

atype: u32

account type

size: u32

price account size

ptype: PriceType

price or calculation type

expo: i32

price exponent

num: u32

number of component prices

num_qt: u32

number of quoters that make up aggregate

last_slot: u64

slot of last valid (not unknown) aggregate price

valid_slot: u64

valid slot-time of agg. price

ema_price: Rational

exponentially moving average price

ema_conf: Rational

exponentially moving average confidence interval

drv1: i64

space for future derived values

drv2: i64

space for future derived values

prod: AccKey

product account key

next: AccKey

next Price account in linked list

prev_slot: u64

valid slot of previous update

prev_price: i64

aggregate price of previous update

prev_conf: u64

confidence interval of previous update

drv3: i64

space for future derived values

agg: PriceInfo

aggregate price info

comp: [PriceComp; 32]

price components one per quoter

Implementations

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

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

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

🔬 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.