pub struct PreAfterMarketData {
pub price: Option<f64>,
pub high_price: Option<f64>,
pub low_price: Option<f64>,
pub volume: Option<i64>,
pub turnover: Option<f64>,
pub change_val: Option<f64>,
pub change_rate: Option<f64>,
pub amplitude: Option<f64>,
}Expand description
美股支持盘前盘后数据 科创板仅支持盘后数据:成交量,成交额
Fields§
§price: Option<f64>盘前或盘后 - 价格
high_price: Option<f64>盘前或盘后 - 最高价
low_price: Option<f64>盘前或盘后 - 最低价
volume: Option<i64>盘前或盘后 - 成交量
turnover: Option<f64>盘前或盘后 - 成交额
change_val: Option<f64>盘前或盘后 - 涨跌额
change_rate: Option<f64>盘前或盘后 - 涨跌幅(该字段为百分比字段,默认不展示%,如20实际对应20%)
amplitude: Option<f64>盘前或盘后 - 振幅(该字段为百分比字段,默认不展示%,如20实际对应20%)
Implementations§
Source§impl PreAfterMarketData
impl PreAfterMarketData
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 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 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 change_val(&self) -> f64
pub fn change_val(&self) -> f64
Returns the value of change_val, or the default value if change_val 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 Clone for PreAfterMarketData
impl Clone for PreAfterMarketData
Source§fn clone(&self) -> PreAfterMarketData
fn clone(&self) -> PreAfterMarketData
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PreAfterMarketData
impl Debug for PreAfterMarketData
Source§impl Default for PreAfterMarketData
impl Default for PreAfterMarketData
Source§impl<'de> Deserialize<'de> for PreAfterMarketDatawhere
PreAfterMarketData: Default,
impl<'de> Deserialize<'de> for PreAfterMarketDatawhere
PreAfterMarketData: Default,
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 Message for PreAfterMarketData
impl Message for PreAfterMarketData
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.Source§impl PartialEq for PreAfterMarketData
impl PartialEq for PreAfterMarketData
Source§impl Serialize for PreAfterMarketData
impl Serialize for PreAfterMarketData
impl Copy for PreAfterMarketData
impl StructuralPartialEq for PreAfterMarketData
Auto Trait Implementations§
impl Freeze for PreAfterMarketData
impl RefUnwindSafe for PreAfterMarketData
impl Send for PreAfterMarketData
impl Sync for PreAfterMarketData
impl Unpin for PreAfterMarketData
impl UnwindSafe for PreAfterMarketData
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