pub struct PriceInfo {
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 volume: 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>昨收价
volume: Option<f64>成交量(股)
Implementations§
Source§impl PriceInfo
impl PriceInfo
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<'de> Deserialize<'de> for PriceInfo
impl<'de> Deserialize<'de> for PriceInfo
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 PriceInfo
impl Message for PriceInfo
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 PriceInfo
Auto Trait Implementations§
impl Freeze for PriceInfo
impl RefUnwindSafe for PriceInfo
impl Send for PriceInfo
impl Sync for PriceInfo
impl Unpin for PriceInfo
impl UnsafeUnpin for PriceInfo
impl UnwindSafe for PriceInfo
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