Struct pyth_client::Product
source · [−]#[repr(C)]pub struct Product {
pub magic: u32,
pub ver: u32,
pub atype: u32,
pub size: u32,
pub px_acc: AccKey,
pub attr: [u8; 464],
}
Expand description
Product accounts contain metadata for a single product, such as its symbol (“Crypto.BTC/USD”) and its base/quote currencies.
Fields
magic: u32
pyth magic number
ver: u32
program version
atype: u32
account type
size: u32
price account size
px_acc: AccKey
first price account in list
attr: [u8; 464]
key/value pairs of reference attr.
Implementations
sourceimpl Product
impl Product
pub fn iter(&self) -> AttributeIter<'_>ⓘNotable traits for AttributeIter<'a>impl<'a> Iterator for AttributeIter<'a> type Item = (&'a str, &'a str);
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Product
impl Send for Product
impl Sync for Product
impl Unpin for Product
impl UnwindSafe for Product
Blanket Implementations
impl<T> AbiExample for T
impl<T> AbiExample for T
pub default fn example() -> T
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more