pub struct Tick {
pub price_last_close: Option<i64>,
pub server_send_to_client_time_ms: Option<i64>,
pub items: Vec<TickItem>,
pub tick_period_type: Option<u32>,
pub tick_volume_precision: Option<i32>,
}Expand description
逐笔,订阅位: SBIT_TICK
Fields§
§price_last_close: Option<i64>昨收价
server_send_to_client_time_ms: Option<i64>富途服务器发送给终端的时间
items: Vec<TickItem>逐笔项数组
tick_period_type: Option<u32>逐笔所在的时段,见TickPeriodType枚举(FTCmdTick.proto)
tick_volume_precision: Option<i32>v1.4.110 final E.5 LOW: 补 field 5 对齐 C++ NNProtoFile/Server/PB/Quote/FTCmdStockQuoteAccumulateData.proto:47. Rust handler 暂无 caller 但 proto 不留漂移 (per pitfall #23 防第 4 次复发).
逐笔数量精度n, 对TickItem中volume放大了10^n次方
Implementations§
Source§impl Tick
impl Tick
Sourcepub fn price_last_close(&self) -> i64
pub fn price_last_close(&self) -> i64
Returns the value of price_last_close, or the default value if price_last_close is unset.
Sourcepub fn server_send_to_client_time_ms(&self) -> i64
pub fn server_send_to_client_time_ms(&self) -> i64
Returns the value of server_send_to_client_time_ms, or the default value if server_send_to_client_time_ms is unset.
Sourcepub fn tick_period_type(&self) -> u32
pub fn tick_period_type(&self) -> u32
Returns the value of tick_period_type, or the default value if tick_period_type is unset.
Sourcepub fn tick_volume_precision(&self) -> i32
pub fn tick_volume_precision(&self) -> i32
Returns the value of tick_volume_precision, or the default value if tick_volume_precision is unset.
Trait Implementations§
Source§impl Message for Tick
impl Message for Tick
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
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,
Encodes the message to a buffer. Read more
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message to a newly allocated buffer.
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,
Encodes the message with a length-delimiter to a buffer. Read more
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,
Encodes the message with a length-delimiter to a newly allocated buffer.
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes an instance of the message from a buffer. Read more
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,
Decodes a length-delimited instance of the message from the buffer.
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,
Decodes an instance of the message from a buffer, and merges it into
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,
Decodes a length-delimited instance of the message from buffer, and
merges it into
self.impl StructuralPartialEq for Tick
Auto Trait Implementations§
impl Freeze for Tick
impl RefUnwindSafe for Tick
impl Send for Tick
impl Sync for Tick
impl Unpin for Tick
impl UnsafeUnpin for Tick
impl UnwindSafe for Tick
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
Mutably borrows from an owned value. Read more