#[repr(C)]pub struct IndexPriceUpdate {
pub instrument_id: InstrumentId,
pub value: Price,
pub ts_event: UnixNanos,
pub ts_init: UnixNanos,
}Expand description
Represents an index price update.
Fields§
§instrument_id: InstrumentIdThe instrument ID for the index price.
value: PriceThe index price.
ts_event: UnixNanosUNIX timestamp (nanoseconds) when the price event occurred.
ts_init: UnixNanosUNIX timestamp (nanoseconds) when the instance was created.
Implementations§
Source§impl IndexPriceUpdate
impl IndexPriceUpdate
Sourcepub fn new(
instrument_id: InstrumentId,
value: Price,
ts_event: UnixNanos,
ts_init: UnixNanos,
) -> Self
pub fn new( instrument_id: InstrumentId, value: Price, ts_event: UnixNanos, ts_init: UnixNanos, ) -> Self
Creates a new IndexPriceUpdate instance.
Sourcepub fn get_metadata(
instrument_id: &InstrumentId,
price_precision: u8,
) -> HashMap<String, String>
pub fn get_metadata( instrument_id: &InstrumentId, price_precision: u8, ) -> HashMap<String, String>
Returns the metadata for the type, for use with serialization formats.
Sourcepub fn get_fields() -> IndexMap<String, String>
pub fn get_fields() -> IndexMap<String, String>
Returns the field map for the type, for use with Arrow schemas.
Trait Implementations§
Source§impl CatalogPathPrefix for IndexPriceUpdate
impl CatalogPathPrefix for IndexPriceUpdate
Source§fn path_prefix() -> &'static str
fn path_prefix() -> &'static str
Returns the path prefix (directory name) for this data type.
Source§impl Clone for IndexPriceUpdate
impl Clone for IndexPriceUpdate
Source§fn clone(&self) -> IndexPriceUpdate
fn clone(&self) -> IndexPriceUpdate
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for IndexPriceUpdate
Source§impl Debug for IndexPriceUpdate
impl Debug for IndexPriceUpdate
Source§impl<'de> Deserialize<'de> for IndexPriceUpdate
impl<'de> Deserialize<'de> for IndexPriceUpdate
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 Display for IndexPriceUpdate
impl Display for IndexPriceUpdate
impl Eq for IndexPriceUpdate
Source§impl From<IndexPriceUpdate> for Data
impl From<IndexPriceUpdate> for Data
Source§fn from(value: IndexPriceUpdate) -> Self
fn from(value: IndexPriceUpdate) -> Self
Converts to this type from the input type.
Source§impl HasTsInit for IndexPriceUpdate
impl HasTsInit for IndexPriceUpdate
Source§impl Hash for IndexPriceUpdate
impl Hash for IndexPriceUpdate
Source§impl PartialEq for IndexPriceUpdate
impl PartialEq for IndexPriceUpdate
Source§fn eq(&self, other: &IndexPriceUpdate) -> bool
fn eq(&self, other: &IndexPriceUpdate) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serializable for IndexPriceUpdate
impl Serializable for IndexPriceUpdate
Source§impl Serialize for IndexPriceUpdate
impl Serialize for IndexPriceUpdate
impl StructuralPartialEq for IndexPriceUpdate
Auto Trait Implementations§
impl Freeze for IndexPriceUpdate
impl RefUnwindSafe for IndexPriceUpdate
impl Send for IndexPriceUpdate
impl Sync for IndexPriceUpdate
impl Unpin for IndexPriceUpdate
impl UnsafeUnpin for IndexPriceUpdate
impl UnwindSafe for IndexPriceUpdate
Blanket Implementations§
impl<T> Allocation for T
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.