#[repr(C)]pub struct InstrumentClose {
pub instrument_id: InstrumentId,
pub close_price: Price,
pub close_type: InstrumentCloseType,
pub ts_event: UnixNanos,
pub ts_init: UnixNanos,
}Expand description
Represents an instrument close at a venue.
Fields§
§instrument_id: InstrumentIdThe instrument ID.
close_price: PriceThe closing price for the instrument.
close_type: InstrumentCloseTypeThe type of closing price.
ts_event: UnixNanosUNIX timestamp (nanoseconds) when the close price event occurred.
ts_init: UnixNanosUNIX timestamp (nanoseconds) when the instance was created.
Implementations§
Source§impl InstrumentClose
impl InstrumentClose
Sourcepub fn new(
instrument_id: InstrumentId,
close_price: Price,
close_type: InstrumentCloseType,
ts_event: UnixNanos,
ts_init: UnixNanos,
) -> Self
pub fn new( instrument_id: InstrumentId, close_price: Price, close_type: InstrumentCloseType, ts_event: UnixNanos, ts_init: UnixNanos, ) -> Self
Creates a new InstrumentClose 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 InstrumentClose
impl CatalogPathPrefix for InstrumentClose
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 InstrumentClose
impl Clone for InstrumentClose
Source§fn clone(&self) -> InstrumentClose
fn clone(&self) -> InstrumentClose
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 InstrumentClose
Source§impl Debug for InstrumentClose
impl Debug for InstrumentClose
Source§impl<'de> Deserialize<'de> for InstrumentClose
impl<'de> Deserialize<'de> for InstrumentClose
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 InstrumentClose
impl Display for InstrumentClose
impl Eq for InstrumentClose
Source§impl From<InstrumentClose> for Data
impl From<InstrumentClose> for Data
Source§fn from(value: InstrumentClose) -> Self
fn from(value: InstrumentClose) -> Self
Converts to this type from the input type.
Source§impl HasTsInit for InstrumentClose
impl HasTsInit for InstrumentClose
Source§impl Hash for InstrumentClose
impl Hash for InstrumentClose
Source§impl PartialEq for InstrumentClose
impl PartialEq for InstrumentClose
Source§fn eq(&self, other: &InstrumentClose) -> bool
fn eq(&self, other: &InstrumentClose) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serializable for InstrumentClose
impl Serializable for InstrumentClose
Source§impl Serialize for InstrumentClose
impl Serialize for InstrumentClose
impl StructuralPartialEq for InstrumentClose
Auto Trait Implementations§
impl Freeze for InstrumentClose
impl RefUnwindSafe for InstrumentClose
impl Send for InstrumentClose
impl Sync for InstrumentClose
impl Unpin for InstrumentClose
impl UnsafeUnpin for InstrumentClose
impl UnwindSafe for InstrumentClose
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.