#[repr(C)]pub struct InstrumentStatus {
pub instrument_id: InstrumentId,
pub action: MarketStatusAction,
pub ts_event: UnixNanos,
pub ts_init: UnixNanos,
pub reason: Option<Ustr>,
pub trading_event: Option<Ustr>,
pub is_trading: Option<bool>,
pub is_quoting: Option<bool>,
pub is_short_sell_restricted: Option<bool>,
}Expand description
Represents an event that indicates a change in an instrument market status.
Fields§
§instrument_id: InstrumentIdThe instrument ID for the status change.
action: MarketStatusActionThe instrument market status action.
ts_event: UnixNanosUNIX timestamp (nanoseconds) when the status event occurred.
ts_init: UnixNanosUNIX timestamp (nanoseconds) when the instance was created.
reason: Option<Ustr>Additional details about the cause of the status change.
trading_event: Option<Ustr>Further information about the status change (if provided).
is_trading: Option<bool>The state of trading in the instrument.
is_quoting: Option<bool>The state of quoting in the instrument.
is_short_sell_restricted: Option<bool>The state of short sell restrictions for the instrument (if applicable).
Implementations§
Source§impl InstrumentStatus
impl InstrumentStatus
Sourcepub fn new(
instrument_id: InstrumentId,
action: MarketStatusAction,
ts_event: UnixNanos,
ts_init: UnixNanos,
reason: Option<Ustr>,
trading_event: Option<Ustr>,
is_trading: Option<bool>,
is_quoting: Option<bool>,
is_short_sell_restricted: Option<bool>,
) -> Self
pub fn new( instrument_id: InstrumentId, action: MarketStatusAction, ts_event: UnixNanos, ts_init: UnixNanos, reason: Option<Ustr>, trading_event: Option<Ustr>, is_trading: Option<bool>, is_quoting: Option<bool>, is_short_sell_restricted: Option<bool>, ) -> Self
Creates a new InstrumentStatus instance.
Sourcepub fn get_metadata(instrument_id: &InstrumentId) -> HashMap<String, String>
pub fn get_metadata(instrument_id: &InstrumentId) -> HashMap<String, String>
Returns the metadata for the type, for use with serialization formats.
Trait Implementations§
Source§impl CatalogPathPrefix for InstrumentStatus
impl CatalogPathPrefix for InstrumentStatus
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 InstrumentStatus
impl Clone for InstrumentStatus
Source§fn clone(&self) -> InstrumentStatus
fn clone(&self) -> InstrumentStatus
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 InstrumentStatus
Source§impl Debug for InstrumentStatus
impl Debug for InstrumentStatus
Source§impl<'de> Deserialize<'de> for InstrumentStatus
impl<'de> Deserialize<'de> for InstrumentStatus
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 InstrumentStatus
impl Display for InstrumentStatus
impl Eq for InstrumentStatus
Source§impl From<InstrumentStatus> for Data
impl From<InstrumentStatus> for Data
Source§fn from(value: InstrumentStatus) -> Self
fn from(value: InstrumentStatus) -> Self
Converts to this type from the input type.
Source§impl HasTsInit for InstrumentStatus
impl HasTsInit for InstrumentStatus
Source§impl Hash for InstrumentStatus
impl Hash for InstrumentStatus
Source§impl PartialEq for InstrumentStatus
impl PartialEq for InstrumentStatus
Source§fn eq(&self, other: &InstrumentStatus) -> bool
fn eq(&self, other: &InstrumentStatus) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serializable for InstrumentStatus
impl Serializable for InstrumentStatus
Source§impl Serialize for InstrumentStatus
impl Serialize for InstrumentStatus
impl StructuralPartialEq for InstrumentStatus
Auto Trait Implementations§
impl Freeze for InstrumentStatus
impl RefUnwindSafe for InstrumentStatus
impl Send for InstrumentStatus
impl Sync for InstrumentStatus
impl Unpin for InstrumentStatus
impl UnsafeUnpin for InstrumentStatus
impl UnwindSafe for InstrumentStatus
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.