pub struct MacroDataPoint {
pub data_time: Option<String>,
pub release_time: Option<String>,
pub value: Option<f64>,
pub predict_value: Option<f64>,
pub previous_value: Option<f64>,
pub unit_type: Option<i32>,
}Expand description
宏观数据点
Fields§
§data_time: Option<String>数据日期 “yyyy-MM-dd”
release_time: Option<String>公布日期 “yyyy-MM-dd HH:mm:ss”
value: Option<f64>公布值(已还原为原始值)
predict_value: Option<f64>预测值(已还原)
previous_value: Option<f64>前值(已还原)
unit_type: Option<i32>MacroDataUnitType, 单位类型
Implementations§
Source§impl MacroDataPoint
impl MacroDataPoint
Sourcepub fn data_time(&self) -> &str
pub fn data_time(&self) -> &str
Returns the value of data_time, or the default value if data_time is unset.
Sourcepub fn release_time(&self) -> &str
pub fn release_time(&self) -> &str
Returns the value of release_time, or the default value if release_time is unset.
Sourcepub fn predict_value(&self) -> f64
pub fn predict_value(&self) -> f64
Returns the value of predict_value, or the default value if predict_value is unset.
Sourcepub fn previous_value(&self) -> f64
pub fn previous_value(&self) -> f64
Returns the value of previous_value, or the default value if previous_value is unset.
Trait Implementations§
Source§impl Clone for MacroDataPoint
impl Clone for MacroDataPoint
Source§fn clone(&self) -> MacroDataPoint
fn clone(&self) -> MacroDataPoint
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 MacroDataPoint
impl Debug for MacroDataPoint
Source§impl Default for MacroDataPoint
impl Default for MacroDataPoint
Source§impl<'de> Deserialize<'de> for MacroDataPointwhere
MacroDataPoint: Default,
impl<'de> Deserialize<'de> for MacroDataPointwhere
MacroDataPoint: 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 MacroDataPoint
impl Message for MacroDataPoint
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 MacroDataPoint
impl PartialEq for MacroDataPoint
Source§impl Serialize for MacroDataPoint
impl Serialize for MacroDataPoint
impl StructuralPartialEq for MacroDataPoint
Auto Trait Implementations§
impl Freeze for MacroDataPoint
impl RefUnwindSafe for MacroDataPoint
impl Send for MacroDataPoint
impl Sync for MacroDataPoint
impl Unpin for MacroDataPoint
impl UnsafeUnpin for MacroDataPoint
impl UnwindSafe for MacroDataPoint
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