pub struct CurrencyData {
pub currency: Option<String>,
pub cur_price: Option<String>,
pub mv: Option<String>,
pub diluted_cost: Option<String>,
pub diluted_profit: Option<String>,
pub diluted_profit_ratio: Option<String>,
pub average_cost: Option<String>,
pub average_profit: Option<String>,
pub average_profit_ratio: Option<String>,
pub unrealized_profit: Option<String>,
pub realized_profit: Option<String>,
pub today_profit: Option<String>,
}Expand description
币种相关字段,按currency币种统计计算
Fields§
§currency: Option<String>币种代码,比如HKD、USD
cur_price: Option<String>当前价
mv: Option<String>市值
diluted_cost: Option<String>摊薄成本
diluted_profit: Option<String>持仓盈亏(摊薄成本价)
diluted_profit_ratio: Option<String>盈亏比例(摊薄成本价)
average_cost: Option<String>平均成本
average_profit: Option<String>持仓盈亏(平均成本价)
average_profit_ratio: Option<String>盈亏比例(摊薄成本价)
unrealized_profit: Option<String>未实现盈亏
realized_profit: Option<String>已实现盈亏
today_profit: Option<String>今日盈亏
Implementations§
Source§impl CurrencyData
impl CurrencyData
Sourcepub fn currency(&self) -> &str
pub fn currency(&self) -> &str
Returns the value of currency, or the default value if currency is unset.
Sourcepub fn cur_price(&self) -> &str
pub fn cur_price(&self) -> &str
Returns the value of cur_price, or the default value if cur_price is unset.
Sourcepub fn diluted_cost(&self) -> &str
pub fn diluted_cost(&self) -> &str
Returns the value of diluted_cost, or the default value if diluted_cost is unset.
Sourcepub fn diluted_profit(&self) -> &str
pub fn diluted_profit(&self) -> &str
Returns the value of diluted_profit, or the default value if diluted_profit is unset.
Sourcepub fn diluted_profit_ratio(&self) -> &str
pub fn diluted_profit_ratio(&self) -> &str
Returns the value of diluted_profit_ratio, or the default value if diluted_profit_ratio is unset.
Sourcepub fn average_cost(&self) -> &str
pub fn average_cost(&self) -> &str
Returns the value of average_cost, or the default value if average_cost is unset.
Sourcepub fn average_profit(&self) -> &str
pub fn average_profit(&self) -> &str
Returns the value of average_profit, or the default value if average_profit is unset.
Sourcepub fn average_profit_ratio(&self) -> &str
pub fn average_profit_ratio(&self) -> &str
Returns the value of average_profit_ratio, or the default value if average_profit_ratio is unset.
Sourcepub fn unrealized_profit(&self) -> &str
pub fn unrealized_profit(&self) -> &str
Returns the value of unrealized_profit, or the default value if unrealized_profit is unset.
Sourcepub fn realized_profit(&self) -> &str
pub fn realized_profit(&self) -> &str
Returns the value of realized_profit, or the default value if realized_profit is unset.
Sourcepub fn today_profit(&self) -> &str
pub fn today_profit(&self) -> &str
Returns the value of today_profit, or the default value if today_profit is unset.
Trait Implementations§
Source§impl Clone for CurrencyData
impl Clone for CurrencyData
Source§fn clone(&self) -> CurrencyData
fn clone(&self) -> CurrencyData
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CurrencyData
impl Debug for CurrencyData
Source§impl Default for CurrencyData
impl Default for CurrencyData
Source§impl Hash for CurrencyData
impl Hash for CurrencyData
Source§impl Message for CurrencyData
impl Message for CurrencyData
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.Source§impl PartialEq for CurrencyData
impl PartialEq for CurrencyData
impl Eq for CurrencyData
impl StructuralPartialEq for CurrencyData
Auto Trait Implementations§
impl Freeze for CurrencyData
impl RefUnwindSafe for CurrencyData
impl Send for CurrencyData
impl Sync for CurrencyData
impl Unpin for CurrencyData
impl UnsafeUnpin for CurrencyData
impl UnwindSafe for CurrencyData
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.