Struct pyth_sdk_solana::state::PriceComp
source · #[repr(C)]pub struct PriceComp {
pub publisher: Pubkey,
pub agg: PriceInfo,
pub latest: PriceInfo,
}
Expand description
The price and confidence contributed by a specific publisher.
Fields§
§publisher: Pubkey
key of contributing publisher
agg: PriceInfo
the price used to compute the current aggregate price
latest: PriceInfo
The publisher’s latest price. This price will be incorporated into the aggregate price when price aggregation runs next.
Trait Implementations§
source§impl BorshDeserialize for PriceCompwhere
Pubkey: BorshDeserialize,
PriceInfo: BorshDeserialize,
impl BorshDeserialize for PriceCompwhere Pubkey: BorshDeserialize, PriceInfo: BorshDeserialize,
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 PriceCompwhere
Pubkey: BorshSerialize,
PriceInfo: BorshSerialize,
impl BorshSerialize for PriceCompwhere Pubkey: BorshSerialize, PriceInfo: BorshSerialize,
source§impl<'de> Deserialize<'de> for PriceComp
impl<'de> Deserialize<'de> for PriceComp
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<PriceComp> for PriceComp
impl PartialEq<PriceComp> for PriceComp
impl Copy for PriceComp
impl Eq for PriceComp
impl StructuralEq for PriceComp
impl StructuralPartialEq for PriceComp
Auto Trait Implementations§
impl RefUnwindSafe for PriceComp
impl Send for PriceComp
impl Sync for PriceComp
impl Unpin for PriceComp
impl UnwindSafe for PriceComp
Blanket Implementations§
§impl<T> AbiEnumVisitor for Twhere
T: Serialize + ?Sized,
impl<T> AbiEnumVisitor for Twhere T: Serialize + ?Sized,
default fn visit_for_abi( &self, _digester: &mut AbiDigester ) -> Result<AbiDigester, DigestError>
§impl<T> AbiEnumVisitor for Twhere
T: Serialize + AbiExample + ?Sized,
impl<T> AbiEnumVisitor for Twhere T: Serialize + AbiExample + ?Sized,
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 Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more