pub struct KLine {Show 13 fields
pub time: String,
pub is_blank: bool,
pub high_price: Option<f64>,
pub open_price: Option<f64>,
pub low_price: Option<f64>,
pub close_price: Option<f64>,
pub last_close_price: Option<f64>,
pub volume: Option<i64>,
pub turnover: Option<f64>,
pub turnover_rate: Option<f64>,
pub pe: Option<f64>,
pub change_rate: Option<f64>,
pub timestamp: Option<f64>,
}Fields§
§time: String时间戳字符串
is_blank: bool是否是空内容的点,若为ture则只有时间信息
high_price: Option<f64>最高价
open_price: Option<f64>开盘价
low_price: Option<f64>最低价
close_price: Option<f64>收盘价
last_close_price: Option<f64>昨收价
volume: Option<i64>成交量
turnover: Option<f64>成交额
turnover_rate: Option<f64>换手率(该字段为百分比字段,展示为小数表示)
pe: Option<f64>市盈率
change_rate: Option<f64>涨跌幅(该字段为百分比字段,默认不展示%,如20实际对应20%)
timestamp: Option<f64>时间戳
Implementations§
Source§impl KLine
impl KLine
Sourcepub fn high_price(&self) -> f64
pub fn high_price(&self) -> f64
Returns the value of high_price, or the default value if high_price is unset.
Sourcepub fn open_price(&self) -> f64
pub fn open_price(&self) -> f64
Returns the value of open_price, or the default value if open_price is unset.
Sourcepub fn low_price(&self) -> f64
pub fn low_price(&self) -> f64
Returns the value of low_price, or the default value if low_price is unset.
Sourcepub fn close_price(&self) -> f64
pub fn close_price(&self) -> f64
Returns the value of close_price, or the default value if close_price is unset.
Sourcepub fn last_close_price(&self) -> f64
pub fn last_close_price(&self) -> f64
Returns the value of last_close_price, or the default value if last_close_price is unset.
Sourcepub fn volume(&self) -> i64
pub fn volume(&self) -> i64
Returns the value of volume, or the default value if volume is unset.
Sourcepub fn turnover(&self) -> f64
pub fn turnover(&self) -> f64
Returns the value of turnover, or the default value if turnover is unset.
Sourcepub fn turnover_rate(&self) -> f64
pub fn turnover_rate(&self) -> f64
Returns the value of turnover_rate, or the default value if turnover_rate is unset.
Sourcepub fn change_rate(&self) -> f64
pub fn change_rate(&self) -> f64
Returns the value of change_rate, or the default value if change_rate is unset.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for KLine
impl<'de> Deserialize<'de> for KLine
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>,
Source§impl Message for KLine
impl Message for KLine
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.