pub struct PricePerformanceRow {
pub trading_day: Option<i64>,
pub trading_day_str: Option<String>,
pub close_price: Option<f64>,
pub open_price: Option<f64>,
pub highest_price: Option<f64>,
pub lowest_price: Option<f64>,
pub last_close_price: Option<f64>,
pub option_iv: Option<f64>,
pub option_hv: Option<f64>,
}Expand description
单个交易日的股价行情数据
Fields§
§trading_day: Option<i64>交易日时间戳(秒)
trading_day_str: Option<String>交易日字符串,格式 YYYY-MM-DD,对应市场时区
close_price: Option<f64>收盘价
open_price: Option<f64>开盘价
highest_price: Option<f64>最高价
lowest_price: Option<f64>最低价
last_close_price: Option<f64>昨收价
option_iv: Option<f64>期权隐含波动率(百分号前的值,如 12.34 表示 12.34%)
option_hv: Option<f64>期权历史波动率(百分号前的值,如 12.34 表示 12.34%)
Implementations§
Source§impl PricePerformanceRow
impl PricePerformanceRow
Sourcepub fn trading_day(&self) -> i64
pub fn trading_day(&self) -> i64
Returns the value of trading_day, or the default value if trading_day is unset.
Sourcepub fn trading_day_str(&self) -> &str
pub fn trading_day_str(&self) -> &str
Returns the value of trading_day_str, or the default value if trading_day_str 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 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 highest_price(&self) -> f64
pub fn highest_price(&self) -> f64
Returns the value of highest_price, or the default value if highest_price is unset.
Sourcepub fn lowest_price(&self) -> f64
pub fn lowest_price(&self) -> f64
Returns the value of lowest_price, or the default value if lowest_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.
Trait Implementations§
Source§impl Clone for PricePerformanceRow
impl Clone for PricePerformanceRow
Source§fn clone(&self) -> PricePerformanceRow
fn clone(&self) -> PricePerformanceRow
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 PricePerformanceRow
impl Debug for PricePerformanceRow
Source§impl Default for PricePerformanceRow
impl Default for PricePerformanceRow
Source§impl<'de> Deserialize<'de> for PricePerformanceRowwhere
PricePerformanceRow: Default,
impl<'de> Deserialize<'de> for PricePerformanceRowwhere
PricePerformanceRow: 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 PricePerformanceRow
impl Message for PricePerformanceRow
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 PricePerformanceRow
impl PartialEq for PricePerformanceRow
Source§impl Serialize for PricePerformanceRow
impl Serialize for PricePerformanceRow
impl StructuralPartialEq for PricePerformanceRow
Auto Trait Implementations§
impl Freeze for PricePerformanceRow
impl RefUnwindSafe for PricePerformanceRow
impl Send for PricePerformanceRow
impl Sync for PricePerformanceRow
impl Unpin for PricePerformanceRow
impl UnsafeUnpin for PricePerformanceRow
impl UnwindSafe for PricePerformanceRow
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