pub struct TickItem {
pub tick_key: Option<u64>,
pub type: Option<i32>,
pub exchange_data_time_ms: Option<u64>,
pub price: Option<u64>,
pub volume: Option<u64>,
pub trade_type: Option<String>,
pub server_recv_from_exchange_time_ms: Option<i64>,
pub price_last_close: Option<u64>,
pub ticker_type: Option<u32>,
}Expand description
逐笔项
Fields§
§tick_key: Option<u64>唯一标志,用于去重
type: Option<i32>逐笔类型,枚举TickItemType
exchange_data_time_ms: Option<u64>成交时间,毫秒
price: Option<u64>成交价[放大10^9倍]
volume: Option<u64>成交量(1股)
trade_type: Option<String>成交类型(一个英文字母的ASCII码),UI直接展示
server_recv_from_exchange_time_ms: Option<i64>富途服务器从交易所收到数据的时间. server重启时该字段为空,client使用前要判空
price_last_close: Option<u64>用于判断涨跌色的基准价格[放大10^9倍],对盘中逐笔表示昨收,对盘前盘后逐笔表示计算盘前、盘后涨跌幅的基础价格
ticker_type: Option<u32>逐笔类型,参考TickPeriodType
Implementations§
Source§impl TickItem
impl TickItem
Sourcepub fn tick_key(&self) -> u64
pub fn tick_key(&self) -> u64
Returns the value of tick_key, or the default value if tick_key is unset.
Sourcepub fn exchange_data_time_ms(&self) -> u64
pub fn exchange_data_time_ms(&self) -> u64
Returns the value of exchange_data_time_ms, or the default value if exchange_data_time_ms is unset.
Sourcepub fn volume(&self) -> u64
pub fn volume(&self) -> u64
Returns the value of volume, or the default value if volume is unset.
Sourcepub fn trade_type(&self) -> &str
pub fn trade_type(&self) -> &str
Returns the value of trade_type, or the default value if trade_type is unset.
Sourcepub fn server_recv_from_exchange_time_ms(&self) -> i64
pub fn server_recv_from_exchange_time_ms(&self) -> i64
Returns the value of server_recv_from_exchange_time_ms, or the default value if server_recv_from_exchange_time_ms is unset.
Sourcepub fn price_last_close(&self) -> u64
pub fn price_last_close(&self) -> u64
Returns the value of price_last_close, or the default value if price_last_close is unset.
Sourcepub fn ticker_type(&self) -> u32
pub fn ticker_type(&self) -> u32
Returns the value of ticker_type, or the default value if ticker_type is unset.
Trait Implementations§
Source§impl Message for TickItem
impl Message for TickItem
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.impl Eq for TickItem
impl StructuralPartialEq for TickItem
Auto Trait Implementations§
impl Freeze for TickItem
impl RefUnwindSafe for TickItem
impl Send for TickItem
impl Sync for TickItem
impl Unpin for TickItem
impl UnsafeUnpin for TickItem
impl UnwindSafe for TickItem
Blanket Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.