Struct pyth_sdk_solana::state::PriceInfo
source · #[repr(C)]pub struct PriceInfo {
pub price: i64,
pub conf: u64,
pub status: PriceStatus,
pub corp_act: CorpAction,
pub pub_slot: u64,
}
Expand description
A price and confidence at a specific slot. This struct can represent either a publisher’s contribution or the outcome of price aggregation.
Fields§
§price: i64
the current price.
For the aggregate price use get_price_no_older_than()
whenever possible. Accessing fields
directly might expose you to stale or invalid prices.
conf: u64
confidence interval around the price.
For the aggregate confidence use get_price_no_older_than()
whenever possible. Accessing
fields directly might expose you to stale or invalid prices.
status: PriceStatus
status of price (Trading is valid)
corp_act: CorpAction
notification of any corporate action
pub_slot: u64
Trait Implementations§
source§impl BorshDeserialize for PriceInfo
impl BorshDeserialize for PriceInfo
fn deserialize_reader<R: Read>(reader: &mut R) -> Result<Self, Error>
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 PriceInfowhere
i64: BorshSerialize,
u64: BorshSerialize,
PriceStatus: BorshSerialize,
CorpAction: BorshSerialize,
impl BorshSerialize for PriceInfowhere
i64: BorshSerialize,
u64: BorshSerialize,
PriceStatus: BorshSerialize,
CorpAction: BorshSerialize,
source§impl<'de> Deserialize<'de> for PriceInfo
impl<'de> Deserialize<'de> for PriceInfo
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for PriceInfo
impl PartialEq for PriceInfo
impl Copy for PriceInfo
impl Eq for PriceInfo
impl StructuralEq for PriceInfo
impl StructuralPartialEq for PriceInfo
Auto Trait Implementations§
impl RefUnwindSafe for PriceInfo
impl Send for PriceInfo
impl Sync for PriceInfo
impl Unpin for PriceInfo
impl UnwindSafe for PriceInfo
Blanket Implementations§
§impl<T> AbiEnumVisitor for T
impl<T> AbiEnumVisitor for T
default fn visit_for_abi( &self, digester: &mut AbiDigester ) -> Result<AbiDigester, DigestError>
§impl<T> AbiEnumVisitor for T
impl<T> AbiEnumVisitor for T
default fn visit_for_abi( &self, _digester: &mut AbiDigester ) -> Result<AbiDigester, DigestError>
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
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more